diff options
author | ko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2013-01-07 06:24:46 +0000 |
---|---|---|
committer | ko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2013-01-07 06:24:46 +0000 |
commit | b8e6fd6ffe9f24921c7138f656596ae3bbdd7ad7 (patch) | |
tree | 43f798a0c4f654657a8e6c27dadb871ac3df7f3f /test/ruby | |
parent | 6e4b187bfe582614a491008a68292e8e67a6cfb0 (diff) | |
download | ruby-b8e6fd6ffe9f24921c7138f656596ae3bbdd7ad7.tar.gz |
* vm_trace.c (rb_threadptr_exec_event_hooks_orig): pop tag before
JUMP_TAG() if frame is `finish' frame.
Without this patch, there is an inconsistency between control
frame stack and tags stack.
[Bug #7668]
* test/ruby/test_settracefunc.rb: add a test for above.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38721 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/ruby')
-rw-r--r-- | test/ruby/test_settracefunc.rb | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/test/ruby/test_settracefunc.rb b/test/ruby/test_settracefunc.rb index ad99f1621d..af97651493 100644 --- a/test/ruby/test_settracefunc.rb +++ b/test/ruby/test_settracefunc.rb @@ -870,5 +870,21 @@ class TestSetTraceFunc < Test::Unit::TestCase m1_test_trace_point_at_return_when_exception end end + + bug_7668 = '[Bug #7668]' + ary = [] + trace = TracePoint.new{|tp| + ary << tp.event + raise + } + begin + trace.enable{ + 1.times{ + raise + } + } + rescue + assert_equal([:b_call, :b_return], ary, bug_7668) + end end end |