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;