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.rb13
1 files changed, 13 insertions, 0 deletions
diff --git a/test/ruby/test_settracefunc.rb b/test/ruby/test_settracefunc.rb
index ab1a37f8eb..4319c8fc75 100644
--- a/test/ruby/test_settracefunc.rb
+++ b/test/ruby/test_settracefunc.rb
@@ -953,4 +953,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