1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* ruby.c (process_options): set progname earlier.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23812 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
nobu 2009-06-22 05:35:51 +00:00
parent a7dedc272e
commit 210e51f3bd
2 changed files with 7 additions and 2 deletions

View file

@ -1,3 +1,7 @@
Mon Jun 22 14:35:45 2009 Nobuyoshi Nakada <nobu@ruby-lang.org>
* ruby.c (process_options): set progname earlier.
Mon Jun 22 13:50:23 2009 Nobuyoshi Nakada <nobu@ruby-lang.org>
* io.c (rb_io_fdatasync): new method IO#fdatasync.

5
ruby.c
View file

@ -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;
}