ruby-changes:3503
From: ko1@a...
Date: Sun, 13 Jan 2008 13:53:18 +0900 (JST)
Subject: [ruby-changes:3503] nobu - Ruby:r15022 (trunk): * ruby.c (load_file): local variable was not initialized when -x flag
nobu 2008-01-13 13:53:02 +0900 (Sun, 13 Jan 2008)
New Revision: 15022
Modified files:
trunk/ChangeLog
trunk/ruby.c
Log:
* ruby.c (load_file): local variable was not initialized when -x flag
is given.
http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/trunk/ruby.c?r1=15022&r2=15021&diff_format=u
http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/trunk/ChangeLog?r1=15022&r2=15021&diff_format=u
Index: ChangeLog
===================================================================
--- ChangeLog (revision 15021)
+++ ChangeLog (revision 15022)
@@ -1,5 +1,8 @@
-Sun Jan 13 13:50:46 2008 Nobuyoshi Nakada <nobu@r...>
+Sun Jan 13 13:53:00 2008 Nobuyoshi Nakada <nobu@r...>
+ * 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]
Index: ruby.c
===================================================================
--- ruby.c (revision 15021)
+++ ruby.c (revision 15022)
@@ -1064,6 +1064,7 @@
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 @@
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);
--
ML: ruby-changes@q...
Info: