trace.disable â true or false
trace.disable { block } â obj
trace.disable { block } â obj
Instance Public methods
Deactivates the trace
Return true if trace was enabled. Return false if trace was disabled.
1 2 3 4 | trace.enabled? #=> true trace.disable #=> false (previous status) trace.enabled? #=> false trace.disable #=> false |
If a block is given, the trace will only be disable within the scope of the block.
1 2 3 4 5 6 7 8 9 10 | trace.enabled? #=> true trace.disable do trace.enabled? # only disabled for this block end trace.enabled? #=> true |
Note: You cannot access event hooks within the block.
1 2 | trace.disable { p tp.lineno } #=> RuntimeError: access from outside |
Please login to continue.