* io.c (rb_open_file): encoding in mode string was ignored if perm is
[ruby-svn.git] / main.c
blobe89f987cc038efb13c60a2ca23099b9239aa2131
1 /**********************************************************************
3 main.c -
5 $Author$
6 created at: Fri Aug 19 13:19:58 JST 1994
8 Copyright (C) 1993-2007 Yukihiro Matsumoto
10 **********************************************************************/
12 #undef RUBY_EXPORT
13 #include "ruby.h"
14 #ifdef HAVE_LOCALE_H
15 #include <locale.h>
16 #endif
18 RUBY_GLOBAL_SETUP
20 int
21 main(int argc, char **argv)
23 #ifdef RUBY_DEBUG_ENV
24 ruby_set_debug_option(getenv("RUBY_DEBUG"));
25 #endif
26 #ifdef HAVE_LOCALE_H
27 setlocale(LC_CTYPE, "");
28 #endif
30 ruby_sysinit(&argc, &argv);
32 RUBY_INIT_STACK;
33 ruby_init();
34 return ruby_run_node(ruby_options(argc, argv));