diff options
Diffstat (limited to 'ruby.c')
-rw-r--r-- | ruby.c | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -955,6 +955,7 @@ opt_enc_index(VALUE enc_name) } #define rb_progname (GET_VM()->progname) +VALUE rb_argv0; static VALUE process_options(VALUE arg) @@ -1470,6 +1471,7 @@ ruby_prog_init(void) rb_define_hooked_variable("$PROGRAM_NAME", &rb_progname, 0, set_arg0); rb_define_global_const("ARGV", rb_argv); + rb_global_variable(&rb_argv0); #ifdef MSDOS /* @@ -1525,6 +1527,7 @@ ruby_process_options(int argc, char **argv) NODE *tree; ruby_script(argv[0]); /* for the time being */ + rb_argv0 = rb_str_new4(rb_progname); args.argc = argc; args.argv = argv; args.opt = cmdline_options_init(&opt); |