summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2006-09-01 04:15:45 +0000
committermatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2006-09-01 04:15:45 +0000
commit123992082d85f9da69ce94eb36a2c6c966055170 (patch)
treebb1c4f6c26a9d600680414174c8f30db3c86ff79
parentc64efb983e1bfaedce86a2a8f910f57124a3102d (diff)
downloadruby-123992082d85f9da69ce94eb36a2c6c966055170.tar.gz
ruby-123992082d85f9da69ce94eb36a2c6c966055170.tar.xz
ruby-123992082d85f9da69ce94eb36a2c6c966055170.zip
* lib/irb/ruby-lex.rb (RubyLex::getc): should not push nil into
reading buffer (@readed). reported in <http://jarp.does.notwork.org/diary/200608c.html#200608311>. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@10817 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--ChangeLog6
-rw-r--r--lib/irb/ruby-lex.rb2
2 files changed, 7 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 3d123bdde..5527553ed 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+Fri Sep 1 09:32:55 2006 Yukihiro Matsumoto <matz@ruby-lang.org>
+
+ * lib/irb/ruby-lex.rb (RubyLex::getc): should not push nil into
+ reading buffer (@readed). reported in
+ <http://jarp.does.notwork.org/diary/200608c.html#200608311>.
+
Thu Aug 31 23:59:03 2006 Nobuyoshi Nakada <nobu@ruby-lang.org>
* lib/mkmf.rb (configuration): follow nil.to_s.
diff --git a/lib/irb/ruby-lex.rb b/lib/irb/ruby-lex.rb
index ab584d525..d8442f305 100644
--- a/lib/irb/ruby-lex.rb
+++ b/lib/irb/ruby-lex.rb
@@ -104,6 +104,7 @@ class RubyLex
@rests.push nil unless buf_input
end
c = @rests.shift
+ return if c == nil
if @here_header
@here_readed.push c
else
@@ -234,7 +235,6 @@ class RubyLex
unless l = lex
throw :TERM_INPUT if @line == ''
else
- #p l
@line.concat l
if @ltype or @continue or @indent > 0
next