mirror of
https://github.com/ruby/ruby.git
synced 2025-09-15 16:44:01 +02:00
parent
8e38d4c78c
commit
8b2e1ca10e
2 changed files with 14 additions and 2 deletions
|
@ -518,6 +518,18 @@ end.join
|
|||
end;
|
||||
end
|
||||
|
||||
def test_backtrace_by_exception
|
||||
begin
|
||||
line = __LINE__; raise "foo"
|
||||
rescue => e
|
||||
end
|
||||
e2 = e.exception("bar")
|
||||
assert_not_equal(e.message, e2.message)
|
||||
assert_equal(e.backtrace, e2.backtrace)
|
||||
loc = e2.backtrace_locations[0]
|
||||
assert_equal([__FILE__, line], [loc.path, loc.lineno])
|
||||
end
|
||||
|
||||
Bug4438 = '[ruby-core:35364]'
|
||||
|
||||
def test_rescue_single_argument
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue