зеркало из https://github.com/github/ruby.git
* ruby.c (load_file): local variable was not initialized when -x flag
is given. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15022 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
Родитель
60e38b6efb
Коммит
e26e05c4ab
|
@ -1,4 +1,7 @@
|
|||
Sun Jan 13 13:50:46 2008 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||
Sun Jan 13 13:53:00 2008 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||
|
||||
* ruby.c (load_file): local variable was not initialized when -x flag
|
||||
is given.
|
||||
|
||||
* ruby.c (load_file): script files should not be affected by locale.
|
||||
[ruby-dev:33054]
|
||||
|
|
3
ruby.c
3
ruby.c
|
@ -1064,6 +1064,7 @@ load_file(VALUE parser, const char *fname, int script, struct cmdline_options *o
|
|||
VALUE c = 1; /* something not nil */
|
||||
VALUE line;
|
||||
char *p;
|
||||
int no_enc = !opt->enc_name;
|
||||
|
||||
if (opt->xflag) {
|
||||
forbid_setid("-x");
|
||||
|
@ -1083,8 +1084,6 @@ load_file(VALUE parser, const char *fname, int script, struct cmdline_options *o
|
|||
|
||||
c = rb_io_getbyte(f);
|
||||
if (c == INT2FIX('#')) {
|
||||
int no_enc = !opt->enc_name;
|
||||
|
||||
c = rb_io_getbyte(f);
|
||||
if (c == INT2FIX('!')) {
|
||||
line = rb_io_gets(f);
|
||||
|
|
Загрузка…
Ссылка в новой задаче