aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lib/irb/input-method.rb2
-rw-r--r--lib/irb/ruby-lex.rb2
2 files changed, 2 insertions, 2 deletions
diff --git a/lib/irb/input-method.rb b/lib/irb/input-method.rb
index 64b1e018d9..9d3580a192 100644
--- a/lib/irb/input-method.rb
+++ b/lib/irb/input-method.rb
@@ -260,7 +260,7 @@ module IRB
#
# See IO#eof? for more information.
def eof?
- @eof
+ super
end
# Whether this input method is still readable when there is no more data to
diff --git a/lib/irb/ruby-lex.rb b/lib/irb/ruby-lex.rb
index ea2158b8b2..a14ac8a275 100644
--- a/lib/irb/ruby-lex.rb
+++ b/lib/irb/ruby-lex.rb
@@ -98,7 +98,7 @@ class RubyLex
@line.force_encoding(@io.encoding)
yield @line, @exp_line_no
end
- break unless l
+ break if @io.eof?
@line = ''
@exp_line_no = @line_no