summaryrefslogtreecommitdiff
path: root/ext/-test-
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-01-19 08:56:58 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-01-19 08:56:58 +0000
commit41bdefd56f628781a19f5d5d5f6a9a05cb4f3e9e (patch)
treec15cbd4a2e83698d98b5da737ca18a4e282a7242 /ext/-test-
parenta87d83cbd87e8e9ac0555c92bbbe46424c27a791 (diff)
tracepoint.c: disable tracepoint
* ext/-test-/tracepoint/tracepoint.c (tracepoint_track_objspace_events): ensure tracepoint disabled. [ruby-dev:47901] [Bug #9426] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44654 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/-test-')
-rw-r--r--ext/-test-/tracepoint/tracepoint.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/ext/-test-/tracepoint/tracepoint.c b/ext/-test-/tracepoint/tracepoint.c
index 245dbd6..aa8c212 100644
--- a/ext/-test-/tracepoint/tracepoint.c
+++ b/ext/-test-/tracepoint/tracepoint.c
@@ -64,8 +64,7 @@ tracepoint_track_objspace_events(VALUE self)
VALUE result = rb_ary_new();
rb_tracepoint_enable(tpval);
- rb_yield(Qundef);
- rb_tracepoint_disable(tpval);
+ rb_ensure(rb_yield, Qundef, rb_tracepoint_disable, tpval);
rb_ary_push(result, SIZET2NUM(track.newobj_count));
rb_ary_push(result, SIZET2NUM(track.free_count));