diff options
Diffstat (limited to 'test/ruby/test_settracefunc.rb')
| -rw-r--r-- | test/ruby/test_settracefunc.rb | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/test/ruby/test_settracefunc.rb b/test/ruby/test_settracefunc.rb index b010846b92..c6a23cc828 100644 --- a/test/ruby/test_settracefunc.rb +++ b/test/ruby/test_settracefunc.rb @@ -1007,4 +1007,17 @@ class TestSetTraceFunc < Test::Unit::TestCase set_trace_func(nil) end end + + def test_tracepoint_b_return_with_next + n = 0 + TracePoint.new(:b_return){ + n += 1 + }.enable{ + 3.times{ + next + } # 3 times b_retun + } # 1 time b_return + + assert_equal 4, n + end end |
