summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/ruby/test_settracefunc.rb15
1 files changed, 15 insertions, 0 deletions
diff --git a/test/ruby/test_settracefunc.rb b/test/ruby/test_settracefunc.rb
index fe2201a30e..51e5268735 100644
--- a/test/ruby/test_settracefunc.rb
+++ b/test/ruby/test_settracefunc.rb
@@ -896,6 +896,21 @@ class TestSetTraceFunc < Test::Unit::TestCase
end
end
+ def test_tracepoint_exception_at_c_return
+ assert_nothing_raised(Timeout::Error, 'infinite trace') do
+ assert_normal_exit %q{
+ begin
+ TracePoint.new(:c_return){|tp|
+ raise
+ }.enable{
+ tap{ itself }
+ }
+ rescue
+ end
+ }, '', timeout: 3
+ end
+ end
+
def test_tracepoint_with_multithreads
assert_nothing_raised do
TracePoint.new{