From 6df1b3a9de0076e1f51a58ffc23b1d42cf2e8366 Mon Sep 17 00:00:00 2001 From: ko1 Date: Fri, 30 Nov 2012 09:55:32 +0000 Subject: [PATCH] * vm_trace.c (tracepoint_disable_m, tracepoint_enable_m): fix block parameter. No arugment should be given to a block which is passed to TracePoint#enable (and disable). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38050 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ChangeLog | 7 +++++++ vm_trace.c | 4 ++-- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 3244e1e40e..a9657b6bdd 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +Fri Nov 30 18:52:56 2012 Koichi Sasada + + * vm_trace.c (tracepoint_disable_m, tracepoint_enable_m): + fix block parameter. + No arugment should be given to a block which is passed + to TracePoint#enable (and disable). + Fri Nov 30 18:23:26 2012 Koichi Sasada * thread.c: rename Thread.control_interrupt diff --git a/vm_trace.c b/vm_trace.c index 2a9a0ce69d..3d305c68ef 100644 --- a/vm_trace.c +++ b/vm_trace.c @@ -974,7 +974,7 @@ tracepoint_enable_m(VALUE tpval) rb_tracepoint_enable(tpval); if (rb_block_given_p()) { - return rb_ensure(rb_yield, tpval, rb_tracepoint_disable, tpval); + return rb_ensure(rb_yield, Qnil, rb_tracepoint_disable, tpval); } else { return tpval; @@ -1007,7 +1007,7 @@ tracepoint_disable_m(VALUE tpval) rb_tracepoint_disable(tpval); if (rb_block_given_p()) { - return rb_ensure(rb_yield, tpval, rb_tracepoint_enable, tpval); + return rb_ensure(rb_yield, Qnil, rb_tracepoint_enable, tpval); } else { return tpval;