Project

General

Profile

Actions

Bug #13181

closed

Unexpected line in rescue backtrace

Added by tsmith (Tim Smith) about 7 years ago. Updated over 6 years ago.

Status:
Closed
Target version:
-
[ruby-core:79388]

Description

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.


Related issues 1 (0 open1 closed)

Has duplicate Ruby master - Misc #14493: begin-rescue-end and def-rescue-end stacktraces inconsistentRejectedActions
Actions

Also available in: Atom PDF

Like0
Like0Like0Like0Like0Like0Like0Like0Like0