mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* vm_trace.c:
tracepoint_attr_return_value (TracePoint#return_value): include `:b_return` for method doc tracepoint_enable_m, tracepoint_disable_m (#enable/#disable): don't have block argument, document block scope git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38052 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
5a82fca5f9
commit
57540a4932
2 changed files with 47 additions and 5 deletions
|
@ -1,3 +1,11 @@
|
||||||
|
Fri Nov 30 19:30:00 2012 Zachary Scott <zachary@zacharyscott.net>
|
||||||
|
|
||||||
|
* vm_trace.c:
|
||||||
|
tracepoint_attr_return_value (TracePoint#return_value):
|
||||||
|
include `:b_return` for method doc
|
||||||
|
tracepoint_enable_m, tracepoint_disable_m (#enable/#disable):
|
||||||
|
don't have block argument, document block scope
|
||||||
|
|
||||||
Fri Nov 30 18:52:56 2012 Koichi Sasada <ko1@atdot.net>
|
Fri Nov 30 18:52:56 2012 Koichi Sasada <ko1@atdot.net>
|
||||||
|
|
||||||
* vm_trace.c (tracepoint_disable_m, tracepoint_enable_m):
|
* vm_trace.c (tracepoint_disable_m, tracepoint_enable_m):
|
||||||
|
|
44
vm_trace.c
44
vm_trace.c
|
@ -868,7 +868,7 @@ tracepoint_attr_self(VALUE tpval)
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Return value from +:return+ and +c_return+ event
|
* Return value from +:return+, +c_return+, and +b_return+ event
|
||||||
*/
|
*/
|
||||||
static VALUE
|
static VALUE
|
||||||
tracepoint_attr_return_value(VALUE tpval)
|
tracepoint_attr_return_value(VALUE tpval)
|
||||||
|
@ -950,8 +950,8 @@ rb_tracepoint_disable(VALUE tpval)
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* call-seq:
|
* call-seq:
|
||||||
* trace.enable -> trace
|
* trace.enable -> trace
|
||||||
* trace.enable { |obj| block } -> obj
|
* trace.enable { block } -> obj
|
||||||
*
|
*
|
||||||
* Activates the trace
|
* Activates the trace
|
||||||
*
|
*
|
||||||
|
@ -962,6 +962,23 @@ rb_tracepoint_disable(VALUE tpval)
|
||||||
* trace.enabled? #=> true
|
* trace.enabled? #=> true
|
||||||
* trace.enable #=> RuntimeError
|
* trace.enable #=> RuntimeError
|
||||||
*
|
*
|
||||||
|
* If a block is given, the trace will only be enabled within the scope of the
|
||||||
|
* block. Note: You cannot access event hooks within the block.
|
||||||
|
*
|
||||||
|
* trace.enabled?
|
||||||
|
* #=> false
|
||||||
|
*
|
||||||
|
* trace.enable do
|
||||||
|
* trace.enabled?
|
||||||
|
* # only enabled for this block
|
||||||
|
* end
|
||||||
|
*
|
||||||
|
* trace.enabled?
|
||||||
|
* #=> false
|
||||||
|
*
|
||||||
|
* trace.enable { p tp.lineno }
|
||||||
|
* #=> RuntimeError: access from outside
|
||||||
|
*
|
||||||
*/
|
*/
|
||||||
static VALUE
|
static VALUE
|
||||||
tracepoint_enable_m(VALUE tpval)
|
tracepoint_enable_m(VALUE tpval)
|
||||||
|
@ -983,8 +1000,8 @@ tracepoint_enable_m(VALUE tpval)
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* call-seq:
|
* call-seq:
|
||||||
* trace.disable -> trace
|
* trace.disable -> trace
|
||||||
* trace.disable { |obj| block } -> obj
|
* trace.disable { block } -> obj
|
||||||
*
|
*
|
||||||
* Deactivates the trace
|
* Deactivates the trace
|
||||||
*
|
*
|
||||||
|
@ -995,6 +1012,23 @@ tracepoint_enable_m(VALUE tpval)
|
||||||
* trace.enabled? #=> false
|
* trace.enabled? #=> false
|
||||||
* trace.disable #=> RuntimeError
|
* trace.disable #=> RuntimeError
|
||||||
*
|
*
|
||||||
|
* If a block is given, the trace will only be disable within the scope of the
|
||||||
|
* block. Note: You cannot access event hooks within the block.
|
||||||
|
*
|
||||||
|
* trace.enabled?
|
||||||
|
* #=> true
|
||||||
|
*
|
||||||
|
* trace.disable do
|
||||||
|
* trace.enabled?
|
||||||
|
* # only disabled for this block
|
||||||
|
* end
|
||||||
|
*
|
||||||
|
* trace.enabled?
|
||||||
|
* #=> true
|
||||||
|
*
|
||||||
|
* trace.enable { p trace.lineno }
|
||||||
|
* #=> RuntimeError: access from outside
|
||||||
|
*
|
||||||
*/
|
*/
|
||||||
static VALUE
|
static VALUE
|
||||||
tracepoint_disable_m(VALUE tpval)
|
tracepoint_disable_m(VALUE tpval)
|
||||||
|
|
Loading…
Reference in a new issue