diff options
| author | nagachika <nagachika@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2013-06-15 16:14:32 +0000 |
|---|---|---|
| committer | nagachika <nagachika@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2013-06-15 16:14:32 +0000 |
| commit | 113d3599caa41605e54be08b84a9403adcdebc0c (patch) | |
| tree | 2e3f6d889e24618d9d248c396254fbc86ccc799f /test/ruby/test_settracefunc.rb | |
| parent | e5633967eac299edab650bc77edfcebf3f2bd871 (diff) | |
merge revision(s) 41300: [Backport #8489]
* compile.c (rb_iseq_compile_node): fix location of a `trace'
instruction (b_return event).
[ruby-core:55305] [ruby-trunk - Bug #8489]
(need a backport to 2.0.0?)
* test/ruby/test_settracefunc.rb: add a test.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_0_0@41319 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
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 |
