Actions
Bug #14057
closedTracePoint#enable and disable should not yield arguments
Description
While working on RubySpecs with Atul Bhosale, we discovered that TracePoint#enable
and #disable
yield nil
instead of not yielding any argument.
This is mostly harmless as we usually use blocks, but it could create issues for lambdas/methods, for example:
def handle_trace; end
TracePoint.new{}.enable(&method(:handle_trace)) # => ArgumentError: wrong number of arguments (given 1, expected 0)
I'm fixing in trunk, would be nice to backport.
Updated by marcandre (Marc-Andre Lafortune) about 7 years ago
- Status changed from Open to Closed
Applied in changeset trunk|r60437.
TracePoint#enable, #disable: Don't yield any argument. [Bug #14057]
Updated by nagachika (Tomoyuki Chikanaga) almost 7 years ago
- Backport changed from 2.3: REQUIRED, 2.4: REQUIRED to 2.3: REQUIRED, 2.4: DONE
ruby_2_4 r62694 merged revision(s) 60437.
Updated by usa (Usaku NAKAMURA) almost 7 years ago
- Backport changed from 2.3: REQUIRED, 2.4: DONE to 2.3: DONE, 2.4: DONE
ruby_2_3 r62824 merged revision(s) 60437.
Actions
Like0
Like0Like0Like0