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:
parent
fcd4ecd576
commit
6df1b3a9de
2 changed files with 9 additions and 2 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue