summaryrefslogtreecommitdiff
path: root/test/ruby/test_settracefunc.rb
diff options
context:
space:
mode:
Diffstat (limited to 'test/ruby/test_settracefunc.rb')
-rw-r--r--test/ruby/test_settracefunc.rb20
1 files changed, 20 insertions, 0 deletions
diff --git a/test/ruby/test_settracefunc.rb b/test/ruby/test_settracefunc.rb
index 5cb6d4a16e..722228d0a1 100644
--- a/test/ruby/test_settracefunc.rb
+++ b/test/ruby/test_settracefunc.rb
@@ -1348,4 +1348,24 @@ class TestSetTraceFunc < Test::Unit::TestCase
}
end
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