1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* 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
This commit is contained in:
ko1 2012-11-30 09:55:32 +00:00
parent fcd4ecd576
commit 6df1b3a9de
2 changed files with 9 additions and 2 deletions

View file

@ -1,3 +1,10 @@
Fri Nov 30 18:52:56 2012 Koichi Sasada <ko1@atdot.net>
* 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 <ko1@atdot.net>
* thread.c: rename Thread.control_interrupt

View file

@ -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;