summaryrefslogtreecommitdiff
path: root/ruby.c
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-06-22 05:35:51 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-06-22 05:35:51 +0000
commit210e51f3bdb1cd38272dc60f6040cfed59b07520 (patch)
treefb83809b25251403ca449a96a917c53be4af28b9 /ruby.c
parenta7dedc272e6e987ed53c468204f9ab0edca4ab2c (diff)
downloadbundler-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.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/ruby.c b/ruby.c
index 2afedf9a0d..e75f2f46c0 100644
--- a/ruby.c
+++ b/ruby.c
@@ -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;
}