Ruby  2.0.0p247(2013-06-27revision41674)
Defines | Functions
goruby.c File Reference
#include "main.c"

Go to the source code of this file.

Defines

#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.
RUBY_EXTERN int ruby_run_node (void *)
 Runs the given compiled source and exits this process.
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)

Define Documentation

Definition at line 2 of file goruby.c.

Referenced by goruby_options(), and main().

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 
)
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.