Ruby  2.0.0p353(2013-11-22revision43784)
Macros | Functions
goruby.c File Reference
#include "main.c"
Include dependency graph for goruby.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))
 
static VALUE init_golf (VALUE arg)
 
void * goruby_options (int argc, char **argv)
 
int goruby_run_node (void *arg)
 

Macro Definition Documentation

#define ruby_options   goruby_options

Definition at line 2 of file goruby.c.

Referenced by goruby_options(), and main().

#define ruby_run_node   goruby_run_node

Definition at line 3 of file goruby.c.

Referenced by goruby_run_node(), and main().

Function Documentation

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

Definition at line 28 of file goruby.c.

References dup2(), and ruby_options.

int goruby_run_node ( void *  arg)

Definition at line 51 of file goruby.c.

References EXIT_FAILURE, EXIT_SUCCESS, init_golf(), NIL_P, Qtrue, rb_protect(), and ruby_run_node.

void Init_golf ( void  )

Referenced by init_golf().

static VALUE init_golf ( VALUE  arg)
static

Definition at line 21 of file goruby.c.

References Init_golf(), and ruby_init_ext().

Referenced by goruby_run_node().

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

Definition at line 1047 of file load.c.

References get_loading_table(), GET_VM, register_init_ext(), st_init_strtable(), and st_update().

Referenced by init_golf().

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

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

This function does:

  • Processses 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 91 of file eval.c.

RUBY_EXTERN int ruby_run_node ( void *  n)

Runs the given compiled source and exits this process.

Return values
0if successfully run thhe source
non-zeroif an error occurred.

Definition at line 300 of file eval.c.