-
-
Notifications
You must be signed in to change notification settings - Fork 942
Closed
Labels
Milestone
Description
Expected Behavior
Return line number the way Ruby does:
$ ruby --version
ruby 2.0.0p481 (2014-05-08 revision 45883) [universal.x86_64-darwin13]
$ echo "/1(/" | ruby
-:1: end pattern with unmatched parenthesis: /1(/
Actual Behavior
Does not follow the general SyntaxError fashion with a line number for Regex parse errors:
$ jruby.exe --version
jruby 9.1.2.0 (2.3.0) 2016-05-26 7357c8f Java HotSpot(TM) 64-Bit Server VM 25.51-b03 on 1.8.0_51-b16 [mswin32-x86_64]
$ echo "/1(/" | jruby.exe
SyntaxError: (RegexpError) end pattern with unmatched parenthesis: /1(/
Compare to
$ echo "(" | jruby.exe
SyntaxError: -:1: syntax error, unexpected end-of-file
Reasoning
We parse user provided Ruby code via eval and extract line numbers from errors to report back.
Reactions are currently unavailable