Ruby  2.5.0dev(2017-10-22revision60238)
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.

Referenced by goruby_options(), and main().

◆ ruby_run_node

#define ruby_run_node   goruby_run_node

Definition at line 3 of file goruby.c.

Referenced by main().

Function Documentation

◆ goruby_options()

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

Definition at line 29 of file goruby.c.

References dup2(), NULL, and ruby_options.

◆ 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 1083 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 97 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
0if successfully run the source
non-zeroif an error occurred.

Definition at line 295 of file eval.c.