From: nagachika00@... Date: 2018-03-07T15:10:54+00:00 Subject: [ruby-core:85971] [Ruby trunk Bug#14057] TracePoint#enable and disable should not yield arguments Issue #14057 has been updated by nagachika (Tomoyuki Chikanaga). Backport changed from 2.3: REQUIRED, 2.4: REQUIRED to 2.3: REQUIRED, 2.4: DONE ruby_2_4 r62694 merged revision(s) 60437. ---------------------------------------- Bug #14057: TracePoint#enable and disable should not yield arguments https://bugs.ruby-lang.org/issues/14057#change-70838 * Author: marcandre (Marc-Andre Lafortune) * Status: Closed * Priority: Normal * Assignee: marcandre (Marc-Andre Lafortune) * Target version: 2.5 * ruby -v: trunk * Backport: 2.3: REQUIRED, 2.4: DONE ---------------------------------------- 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: ~~~ ruby 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. -- https://bugs.ruby-lang.org/ Unsubscribe: