зеркало из https://github.com/github/ruby.git
* 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:
Родитель
53ea4c0cbd
Коммит
7799fe9e9f
|
@ -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.
|
* 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)
|
#define rb_progname (GET_VM()->progname)
|
||||||
|
VALUE rb_argv0;
|
||||||
|
|
||||||
static VALUE
|
static VALUE
|
||||||
process_options(VALUE arg)
|
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_hooked_variable("$PROGRAM_NAME", &rb_progname, 0, set_arg0);
|
||||||
|
|
||||||
rb_define_global_const("ARGV", rb_argv);
|
rb_define_global_const("ARGV", rb_argv);
|
||||||
|
rb_global_variable(&rb_argv0);
|
||||||
|
|
||||||
#ifdef MSDOS
|
#ifdef MSDOS
|
||||||
/*
|
/*
|
||||||
|
@ -1525,6 +1527,7 @@ ruby_process_options(int argc, char **argv)
|
||||||
NODE *tree;
|
NODE *tree;
|
||||||
|
|
||||||
ruby_script(argv[0]); /* for the time being */
|
ruby_script(argv[0]); /* for the time being */
|
||||||
|
rb_argv0 = rb_str_new4(rb_progname);
|
||||||
args.argc = argc;
|
args.argc = argc;
|
||||||
args.argv = argv;
|
args.argv = argv;
|
||||||
args.opt = cmdline_options_init(&opt);
|
args.opt = cmdline_options_init(&opt);
|
||||||
|
|
Загрузка…
Ссылка в новой задаче