You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I corrected this for fcall nodes but I imagine other cases exist. This at least fixes the reported issue...
... it seems this is another case.
When there's a method invocation with multiline method invocation as an argument:
puts"RUBY_ENGINE: #{RUBY_ENGINE}"puts"RUBY_VERSION: #{RUBY_VERSION}"puts"JRUBY_VERSION: #{JRUBY_VERSION}"ifdefined?(JRUBY_VERSION)puts'=' * 40defexpect(*)Expectation.newendclassExpectationdefto(matcher)raiseendendclassMatcherdefand(matcher)endendbeginexpect('something').toMatcher.new# Line 22.andMatcher.new# Line 23rescue=>errorputserror.backtraceend
$ jruby -v
jruby 9.1.12.0 (2.3.3) 2017-06-15 33c6439 Java HotSpot(TM) 64-Bit Server VM 25.25-b02 on 1.8.0_25-b17 +jit [darwin-x86_64]
$ uname -a
Darwin macbookpro.local 16.7.0 Darwin Kernel Version 16.7.0: Thu Jun 15 17:36:27 PDT 2017; root:xnu-3789.70.16~2/RELEASE_X86_64 x86_64
Expected Behavior
With the above script, backtrace should include the beginning line number of the method invocation (the expect('something').to Matcher.new line) as CRuby does.
Actual Behavior
JRuby 9.1.10.0 reports backtrace including the last line number of the method invocation (the .and Matcher.new) line).
The text was updated successfully, but these errors were encountered:
This is similar to #4664.
As @enebo said in #4664 (comment):
... it seems this is another case.
When there's a method invocation with multiline method invocation as an argument:
... JRuby reports the following backtrace:
... in contrast to CRuby:
Environment
Expected Behavior
With the above script, backtrace should include the beginning line number of the method invocation (the
expect('something').to Matcher.new
line) as CRuby does.Actual Behavior
JRuby 9.1.10.0 reports backtrace including the last line number of the method invocation (the
.and Matcher.new)
line).The text was updated successfully, but these errors were encountered: