Skip to content
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

Closed
dymaxionuk opened this issue Oct 7, 2016 · 1 comment
Closed

Comments

@dymaxionuk
Copy link

@dymaxionuk dymaxionuk commented Oct 7, 2016

Environment

ruby 2.3.0p0 (2015-12-25 revision 53290) [i386-mingw32]
jruby 9.1.2.0 (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
  123*/20


  'padding'
  'more padding'
end

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

@enebo
Copy link
Member

@enebo 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 9.1.9.0 milestone Mar 12, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
3 participants
You can’t perform that action at this time.