Issue #13181 has been updated by usa (Usaku NAKAMURA).

Backport changed from 2.2: WONTFIX, 2.3: REQUIRED, 2.4: DONE to 2.2: WONTFIX, 2.3: DONE, 2.4: DONE

ruby_2_3 r60947 merged revision(s) 58499,58500.

----------------------------------------
Bug #13181: Unexpected line in rescue backtrace
https://bugs.ruby-lang.org/issues/13181#change-68088

* Author: tsmith (Tim Smith)
* Status: Closed
* Priority: Normal
* Assignee: ko1 (Koichi Sasada)
* Target version: 
* ruby -v: 
* Backport: 2.2: WONTFIX, 2.3: DONE, 2.4: DONE
----------------------------------------
~~~ ruby
def foo           # 1
  puts 'hello'    # 2
  raise 'x'       # 3
  puts 'goodbye'  # 4
rescue            # 5
  raise 'y'       # 6
end               # 7
                  # 8
foo               # 9
~~~

~~~
hello
backtrace.rb:6:in `rescue in foo': y (RuntimeError)
	from backtrace.rb:2:in `foo'
	from backtrace.rb:9:in `<main>'
~~~

I expect line 6 and line 9 in the backtrace, but not line 2.



-- 
https://bugs.ruby-lang.org/

Unsubscribe: <mailto:ruby-core-request / ruby-lang.org?subject=unsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-core>