From 17f0f3d9fd2aac7e88a84b9c203efe876dbb0ef0 Mon Sep 17 00:00:00 2001 From: Kevin Newton Date: Wed, 8 May 2024 10:15:56 -0400 Subject: [PATCH] Simplify regexp to account for prism error messages Co-authored-by: Stan Lo --- lib/irb/ruby-lex.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/irb/ruby-lex.rb b/lib/irb/ruby-lex.rb index cfe36be83..86e340eb0 100644 --- a/lib/irb/ruby-lex.rb +++ b/lib/irb/ruby-lex.rb @@ -230,7 +230,7 @@ def check_code_syntax(code, local_variables:) # example: # ' return :recoverable_error - when /syntax error, unexpected end-of-input/ + when /unexpected end-of-input/ # "syntax error, unexpected end-of-input, expecting keyword_end" # # example: @@ -240,7 +240,7 @@ def check_code_syntax(code, local_variables:) # fuga # end return :recoverable_error - when /syntax error, unexpected keyword_end/ + when /unexpected keyword_end/ # "syntax error, unexpected keyword_end" # # example: @@ -250,7 +250,7 @@ def check_code_syntax(code, local_variables:) # example: # end return :unrecoverable_error - when /syntax error, unexpected '\.'/ + when /unexpected '\.'/ # "syntax error, unexpected '.'" # # example: