summaryrefslogtreecommitdiffstats
path: root/lib/irb/ruby-lex.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/irb/ruby-lex.rb')
-rw-r--r--lib/irb/ruby-lex.rb5
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/irb/ruby-lex.rb b/lib/irb/ruby-lex.rb
index 9e055ee94..4c51afbc2 100644
--- a/lib/irb/ruby-lex.rb
+++ b/lib/irb/ruby-lex.rb
@@ -100,7 +100,8 @@ class RubyLex
def getc
while @rests.empty?
- return nil unless buf_input
+# return nil unless buf_input
+ @rests.push nil unless buf_input
end
c = @rests.shift
if @here_header
@@ -121,7 +122,7 @@ class RubyLex
def gets
l = ""
while c = getc
- l.concat c
+ l.concat(c)
break if c == "\n"
end
return nil if l == "" and c.nil?