diff options
author | Jari Vetoniemi <jari.vetoniemi@indooratlas.com> | 2020-03-16 18:49:26 +0900 |
---|---|---|
committer | Jari Vetoniemi <jari.vetoniemi@indooratlas.com> | 2020-03-30 00:39:06 +0900 |
commit | fcbf63e62c627deae76c1b8cb8c0876c536ed811 (patch) | |
tree | 64cb17de3f41a2b6fef2368028fbd00349946994 /jni/ruby/main.c |
Fresh start
Diffstat (limited to 'jni/ruby/main.c')
-rw-r--r-- | jni/ruby/main.c | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/jni/ruby/main.c b/jni/ruby/main.c new file mode 100644 index 0000000..095c19c --- /dev/null +++ b/jni/ruby/main.c @@ -0,0 +1,38 @@ +/********************************************************************** + + main.c - + + $Author: ko1 $ + created at: Fri Aug 19 13:19:58 JST 1994 + + Copyright (C) 1993-2007 Yukihiro Matsumoto + +**********************************************************************/ + +#undef RUBY_EXPORT +#include "ruby.h" +#include "vm_debug.h" +#ifdef HAVE_LOCALE_H +#include <locale.h> +#endif +#ifdef RUBY_DEBUG_ENV +#include <stdlib.h> +#endif + +int +main(int argc, char **argv) +{ +#ifdef RUBY_DEBUG_ENV + ruby_set_debug_option(getenv("RUBY_DEBUG")); +#endif +#ifdef HAVE_LOCALE_H + setlocale(LC_CTYPE, ""); +#endif + + ruby_sysinit(&argc, &argv); + { + RUBY_INIT_STACK; + ruby_init(); + return ruby_run_node(ruby_options(argc, argv)); + } +} |