diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2009-06-22 05:35:51 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2009-06-22 05:35:51 +0000 |
commit | 210e51f3bdb1cd38272dc60f6040cfed59b07520 (patch) | |
tree | fb83809b25251403ca449a96a917c53be4af28b9 /ruby.c | |
parent | a7dedc272e6e987ed53c468204f9ab0edca4ab2c (diff) | |
download | bundler-210e51f3bdb1cd38272dc60f6040cfed59b07520.tar.gz |
* ruby.c (process_options): set progname earlier.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23812 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ruby.c')
-rw-r--r-- | ruby.c | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -1224,7 +1224,7 @@ process_options(int argc, char **argv, struct cmdline_options *opt) rb_encoding *enc, *lenc; const char *s; char fbuf[MAXPATHLEN]; - long i = proc_options(argc, argv, opt, 0); + int i = (int)proc_options(argc, argv, opt, 0); rb_thread_t *th = GET_THREAD(); rb_env_t *env = 0; @@ -1340,6 +1340,8 @@ process_options(int argc, char **argv, struct cmdline_options *opt) } } ruby_init_gems(!(opt->disable & DISABLE_BIT(gems))); + rb_progname = opt->script_name; + rb_vm_set_progname(rb_progname); ruby_set_argv(argc, argv); process_sflag(&opt->sflag); @@ -1447,7 +1449,6 @@ process_options(int argc, char **argv, struct cmdline_options *opt) rb_define_readonly_boolean("$-a", opt->do_split); rb_set_safe_level(opt->safe_level); - rb_progname = opt->script_name; return iseq; } |