summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2002-02-10 07:55:40 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2002-02-10 07:55:40 +0000
commit2a7c4526f262d69440b5395786082e02b2ce1871 (patch)
treed893394bf1ea4eb043c185098f562cdeb505ab2b
parentb4f4a187609023a1af454ff18720170adbe1d094 (diff)
* ruby.c (load_file): avoid SEGV on '#' only input.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_6@2062 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--ChangeLog4
-rw-r--r--ruby.c1
-rw-r--r--version.h4
3 files changed, 7 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index a8b2e7421e..e28ca55a77 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+Sun Feb 10 16:52:53 2002 Nobuyoshi Nakada <nobu.nakada@nifty.ne.jp>
+
+ * ruby.c (load_file): avoid SEGV on '#' only input.
+
Fri Feb 8 23:07:23 2002 Yukihiro Matsumoto <matz@ruby-lang.org>
* eval.c (rb_eval): singleton chech should be moved from yycompile
diff --git a/ruby.c b/ruby.c
index fcbee4c46e..e1ee456c16 100644
--- a/ruby.c
+++ b/ruby.c
@@ -791,6 +791,7 @@ load_file(fname, script)
c = rb_io_getc(f);
if (c == INT2FIX('#')) {
line = rb_io_gets(f);
+ if (NIL_P(line)) return;
line_start++;
if (RSTRING(line)->len > 2 && RSTRING(line)->ptr[0] == '!') {
diff --git a/version.h b/version.h
index 3946f643fd..c007370883 100644
--- a/version.h
+++ b/version.h
@@ -1,4 +1,4 @@
#define RUBY_VERSION "1.6.6"
-#define RUBY_RELEASE_DATE "2002-02-09"
+#define RUBY_RELEASE_DATE "2002-02-10"
#define RUBY_VERSION_CODE 166
-#define RUBY_RELEASE_CODE 20020209
+#define RUBY_RELEASE_CODE 20020210