aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authoraycabta <aycabta@gmail.com>2019-05-27 10:18:09 +0900
committeraycabta <aycabta@gmail.com>2019-05-27 10:18:09 +0900
commit9840f52c77a928479919e539d2e47ce36b5ede49 (patch)
tree6cef0f5ca1a9a37f5e642791fd80ec2a4eef4586 /lib
parent1d301acbe8e9b0df7872d6719d6646ade25630d6 (diff)
downloadruby-9840f52c77a928479919e539d2e47ce36b5ede49.tar.gz
Use IRB::InputMethod#eof? to quit
Diffstat (limited to 'lib')
-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