diff options
Diffstat (limited to 'test')
-rw-r--r-- | test/ruby/test_settracefunc.rb | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/test/ruby/test_settracefunc.rb b/test/ruby/test_settracefunc.rb index 58e927c217..1dcd2ccbee 100644 --- a/test/ruby/test_settracefunc.rb +++ b/test/ruby/test_settracefunc.rb @@ -1332,4 +1332,24 @@ class TestSetTraceFunc < Test::Unit::TestCase } assert_equal [__LINE__ - 3, __LINE__ - 2], lines, 'Bug #10449' end + + class Bug10724 + def initialize + loop{return} + end + end + + def test_throwing_return_with_finish_frame + target_th = Thread.current + evs = [] + + TracePoint.new(:call, :return){|tp| + return if Thread.current != target_th + evs << tp.event + }.enable{ + a = Bug10724.new + } + + assert_equal([:call, :return], evs) + end end |