Ruby  1.9.3p392(2013-02-22revision39386)
main.c
Go to the documentation of this file.
1 /**********************************************************************
2 
3  main.c -
4 
5  $Author: shyouhei $
6  created at: Fri Aug 19 13:19:58 JST 1994
7 
8  Copyright (C) 1993-2007 Yukihiro Matsumoto
9 
10 **********************************************************************/
11 
12 #undef RUBY_EXPORT
13 #include "ruby.h"
14 #include "debug.h"
15 #ifdef HAVE_LOCALE_H
16 #include <locale.h>
17 #endif
18 #ifdef RUBY_DEBUG_ENV
19 #include <stdlib.h>
20 #endif
21 
23 
24 int
25 main(int argc, char **argv)
26 {
27 #ifdef RUBY_DEBUG_ENV
28  ruby_set_debug_option(getenv("RUBY_DEBUG"));
29 #endif
30 #ifdef HAVE_LOCALE_H
31  setlocale(LC_CTYPE, "");
32 #endif
33 
34  ruby_sysinit(&argc, &argv);
35  {
37  ruby_init();
38  return ruby_run_node(ruby_options(argc, argv));
39  }
40 }
41