Issue #13181 has been updated by Shyouhei Urabe.

Status changed from Open to Assigned
Assignee set to Nobuyoshi Nakada

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

* Author: Tim Smith
* Status: Assigned
* Priority: Normal
* Assignee: Nobuyoshi Nakada
* Target version: 
* ruby -v: 
* Backport: 2.2: UNKNOWN, 2.3: UNKNOWN, 2.4: UNKNOWN
----------------------------------------
~~~ 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>