New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wrong line number reported in backtrace of syntax error caused by '*/' #4211

dymaxionuk opened this Issue Oct 7, 2016 · 1 comment


None yet
3 participants

dymaxionuk commented Oct 7, 2016


ruby 2.3.0p0 (2015-12-25 revision 53290) [i386-mingw32]
jruby (2.3.0) 2016-05-26 7357c8f Java HotSpot(TM) Client VM 25.31-b07 on 1.8.0_31-b13 +jit [mswin32-x86]
$ systeminfo | findstr /B /C:"OS Name" /C:"OS Version"
OS Name:                   Microsoft Windows 7 Enterprise
OS Version:                6.1.7601 Service Pack 1 Build 7601

Expected Behavior

Correct line number is reported in backtrace when raising syntax error.

Example code:

def a_method

  'more padding'

Actual Behavior

Output in MRI 2.3.0

$ ruby test.rb
test.rb:2: unterminated regexp meets end of file
test.rb:2: syntax error, unexpected end-of-input, expecting keyword_end

Output in JRuby

$ jruby test.rb
SyntaxError: test.rb:7: unterminated string meets end of file

Cross referencing another linenum issue: #4154


This comment has been minimized.

Show comment
Hide comment

enebo Mar 12, 2017


This issue is unrelated to #4154


enebo commented Mar 12, 2017

This issue is unrelated to #4154

@enebo enebo closed this in 2721667 Mar 12, 2017

@enebo enebo added this to the JRuby milestone Mar 12, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment