summaryrefslogtreecommitdiff
path: root/lib/irb/color.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/irb/color.rb')
-rw-r--r--lib/irb/color.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/irb/color.rb b/lib/irb/color.rb
index fa8502c5d1..b942299789 100644
--- a/lib/irb/color.rb
+++ b/lib/irb/color.rb
@@ -137,7 +137,7 @@ module IRB # :nodoc:
Ripper::Lexer.new(code).scan.each do |elem|
str = elem.tok
- next if allow_last_error and elem.message&.end_with?('meets end of file')
+ next if allow_last_error and /meets end of file|unexpected end-of-input/ =~ elem.message
next if ([elem.pos[0], elem.pos[1] + str.bytesize] <=> pos) <= 0
str.each_line do |line|