diff options
author | aycabta <aycabta@gmail.com> | 2019-05-27 10:18:09 +0900 |
---|---|---|
committer | aycabta <aycabta@gmail.com> | 2019-05-27 10:18:09 +0900 |
commit | 9840f52c77a928479919e539d2e47ce36b5ede49 (patch) | |
tree | 6cef0f5ca1a9a37f5e642791fd80ec2a4eef4586 /lib/irb | |
parent | 1d301acbe8e9b0df7872d6719d6646ade25630d6 (diff) | |
download | ruby-9840f52c77a928479919e539d2e47ce36b5ede49.tar.gz |
Use IRB::InputMethod#eof? to quit
Diffstat (limited to 'lib/irb')
-rw-r--r-- | lib/irb/input-method.rb | 2 | ||||
-rw-r--r-- | lib/irb/ruby-lex.rb | 2 |
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 |