Project

General

Profile

Bug #14057

TracePoint#enable and disable should not yield arguments

Added by marcandre (Marc-Andre Lafortune) about 1 year ago. Updated 10 months ago.

Status:
Closed
Priority:
Normal
Target version:
ruby -v:
trunk
[ruby-core:83572]

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.

Associated revisions

Revision 7e3bd664
Added by marcandre (Marc-Andre Lafortune) about 1 year ago

TracePoint#enable, #disable: Don't yield any argument. [Bug #14057]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60437 b2dd03c8-39d4-4d8f-98ff-823fe69b080e

Revision 60437
Added by marcandre (Marc-Andre Lafortune) about 1 year ago

TracePoint#enable, #disable: Don't yield any argument. [Bug #14057]

Revision 60437
Added by marcandre (Marc-Andre Lafortune) about 1 year ago

TracePoint#enable, #disable: Don't yield any argument. [Bug #14057]

Revision 60437
Added by marcandre (Marc-Andre Lafortune) about 1 year ago

TracePoint#enable, #disable: Don't yield any argument. [Bug #14057]

Revision acbf49de
Added by nagachika (Tomoyuki Chikanaga) 11 months ago

merge revision(s) 60437: [Backport #14057]

TracePoint#enable, #disable: Don't yield any argument. [Bug #14057]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_4@62694 b2dd03c8-39d4-4d8f-98ff-823fe69b080e

Revision 62694
Added by nagachika (Tomoyuki Chikanaga) 11 months ago

merge revision(s) 60437: [Backport #14057]

TracePoint#enable, #disable: Don't yield any argument. [Bug #14057]

Revision e9a9f674
Added by usa (Usaku NAKAMURA) 10 months ago

merge revision(s) 60437: [Backport #14057]

TracePoint#enable, #disable: Don't yield any argument. [Bug #14057]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_3@62824 b2dd03c8-39d4-4d8f-98ff-823fe69b080e

Revision 62824
Added by usa (Usaku NAKAMURA) 10 months ago

merge revision(s) 60437: [Backport #14057]

TracePoint#enable, #disable: Don't yield any argument. [Bug #14057]

History

#1

Updated by marcandre (Marc-Andre Lafortune) about 1 year 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) 11 months 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) 10 months 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.

Also available in: Atom PDF