Ruby 2.7.0p0(2019-12-25revision647ee6f091eafcce70ffb75ddf7e121e192ab217)

Macros | Functions
goruby.c File Reference
`#include "main.c"`

Go to the source code of this file.

## Macros
#define | ruby_options goruby_options
#define | ruby_run_node goruby_run_node

## Functions
void | Init_golf (void)
RUBY_EXTERN void * | ruby_options (int argc, char **argv)
| Processes command line arguments and compiles the Ruby source to execute. More...
RUBY_EXTERN int | ruby_run_node (void *)
| Runs the given compiled source and exits this process. More...
RUBY_EXTERN void | ruby_init_ext (const char *name, void(*init)(void))
void * | goruby_options (int argc, char **argv)
int | goruby_run_node (void *arg)

## Macro Definition Documentation

## ◆ ruby_options

#define ruby_options goruby_options

Definition at line 2 of file goruby.c.

## ◆ ruby_run_node

#define ruby_run_node goruby_run_node

Definition at line 3 of file goruby.c.

## Function Documentation

## ◆ goruby_options()

void* goruby_options | ( | int | argc,
|  | char ** | argv
| ) |  |

Definition at line 29 of file goruby.c.

References argc, argv, close(), dup(), dup2(), isatty(), n, NULL, pipe(), ruby_options, and write().

## ◆ goruby_run_node()

int goruby_run_node | ( | void * | arg | ) |

Definition at line 59 of file goruby.c.

References NIL_P, and rb_protect().

## ◆ Init_golf()

void Init_golf | ( | void |  | ) |

## ◆ ruby_init_ext()

RUBY_EXTERN void ruby_init_ext | ( | const char * | name,
|  | void(*)(void) | init
| ) |  |

Definition at line 1139 of file load.c.

## ◆ ruby_options()

RUBY_EXTERN void* ruby_options | ( | int | argc,
|  | char ** | argv
| ) |  |

Processes command line arguments and compiles the Ruby source to execute.

This function does:

- Processes the given command line flags and arguments for ruby(1)
- compiles the source code from the given argument, -e or stdin, and
- returns the compiled source as an opaque pointer to an internal data structure

Returns
  an opaque pointer to the compiled source or an internal special value.

See also
  ruby_executable_node().

Definition at line 114 of file eval.c.

## ◆ ruby_run_node()

RUBY_EXTERN int ruby_run_node | ( | void * | n | ) |

Runs the given compiled source and exits this process.

Return values

  0 | if successfully run the source
  non-zero | if an error occurred.

Definition at line 326 of file eval.c.