diff options
Diffstat (limited to 'test/ruby/test_settracefunc.rb')
-rw-r--r-- | test/ruby/test_settracefunc.rb | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/test/ruby/test_settracefunc.rb b/test/ruby/test_settracefunc.rb index 2ada093f8d..6021038fe9 100644 --- a/test/ruby/test_settracefunc.rb +++ b/test/ruby/test_settracefunc.rb @@ -2115,4 +2115,16 @@ class TestSetTraceFunc < Test::Unit::TestCase } assert_equal [], events end + + def test_return_event_with_rescue + obj = Object.new + def obj.example + 1 if 1 == 1 + rescue + end + ok = false + tp = TracePoint.new(:return) {ok = true} + tp.enable {obj.example} + assert ok, "return event should be emitted" + end end |