1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

Use IRB::InputMethod#eof? to quit

This commit is contained in:
aycabta 2019-05-27 10:18:09 +09:00
parent 1d301acbe8
commit 9840f52c77
2 changed files with 2 additions and 2 deletions

View file

@ -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

View file

@ -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