mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* ruby.c (rb_argv0): revised for ext/tk.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@17067 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
53ea4c0cbd
commit
7799fe9e9f
2 changed files with 6 additions and 1 deletions
|
@ -1,4 +1,6 @@
|
|||
Tue Jun 10 11:24:43 2008 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||
Tue Jun 10 11:25:15 2008 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||
|
||||
* ruby.c (rb_argv0): revised for ext/tk.
|
||||
|
||||
* include/ruby/encoding.h: not to use varargs.h since requiring C89.
|
||||
|
||||
|
|
3
ruby.c
3
ruby.c
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue