The test for TracePoint#raised_exception had never worked correctly

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63179 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
mame 2018-04-17 08:47:56 +00:00
Родитель 2881a6d412
Коммит fcdabb50b8
1 изменённых файлов: 2 добавлений и 2 удалений

Просмотреть файл

@ -729,13 +729,13 @@ class TestSetTraceFunc < Test::Unit::TestCase
end
def test_tracepoint_raised_exception
trace = TracePoint.new(:call, :return){|tp|
trace = TracePoint.new(:call, :return, :raise){|tp|
next if !target_thread?
case tp.event
when :call, :return
assert_raise(RuntimeError) { tp.raised_exception }
when :raise
assert_equal(XYZZYError, tp.raised_exception)
assert_kind_of(XYZZYException, tp.raised_exception)
end
}
trace.enable{