1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13: #undef RUBY_EXPORT
14: #include "ruby/ruby.h"
15: #ifdef HAVE_LOCALE_H
16: #include <locale.h>
17: #endif
18:
19: RUBY_GLOBAL_SETUP
20:
21: int
22: main(int argc, char **argv, char **envp)
23: {
24: #ifdef RUBY_DEBUG_ENV
25: extern void ruby_set_debug_option(const char *);
26: ruby_set_debug_option(getenv("RUBY_DEBUG"));
27: #endif
28: #ifdef HAVE_LOCALE_H
29: setlocale(LC_CTYPE, "");
30: #endif
31:
32: ruby_sysinit(&argc, &argv);
33: {
34: RUBY_INIT_STACK;
35: ruby_init();
36: #ifdef RUBY_MAIN_INIT
37: RUBY_MAIN_INIT();
38: #endif
39: return ruby_run_node(ruby_options(argc, argv));
40: }
41: }