Backport #9403

Incorrect __callee__ in delegate classes

Added by Avdi Grimm over 1 year ago. Updated over 1 year ago.

[ruby-core:<unknown>]
Status:Closed
Priority:Normal
Assignee:Yui NARUSE

Description

__callee__ always contains the value :call in any method of a class derived from Delegator. This is new behavior in 2.1, and is present in trunk.

Using the attached script, here's the output on 1.9.3, 2.0, 2.1, and trunk:

Ruby 1.9.3
__callee__ in Proxy#foo: foo
__callee__ in Target#foo: foo
__callee__ in DelegateClassProxy#foo: foo
__callee__ in Target#foo: foo
Ruby 2.0.0
__callee__ in Proxy#foo: foo
__callee__ in Target#foo: foo
__callee__ in DelegateClassProxy#foo: foo
__callee__ in Target#foo: foo
Ruby 2.1.0
__callee__ in Proxy#foo: call
__callee__ in Target#foo: foo
__callee__ in DelegateClassProxy#foo: call
__callee__ in Target#foo: foo
Ruby 2.2.0
__callee__ in Proxy#foo: call
__callee__ in Target#foo: foo
__callee__ in DelegateClassProxy#foo: call
__callee__ in Target#foo: foo

delegate-callee.rb Magnifier (452 Bytes) Avdi Grimm, 01/12/2014 06:27 PM

Associated revisions

Revision 44631
Added by Nobuyoshi Nakada over 1 year ago

ChangeLog: fix ref

  • ChangeLog: fix ML number and ticket number of r44630. [Bug #9403]

Revision 44631
Added by Nobuyoshi Nakada over 1 year ago

ChangeLog: fix ref

  • ChangeLog: fix ML number and ticket number of r44630. [Bug #9403]

Revision 44794
Added by Yui NARUSE over 1 year ago

merge revision(s) 44630,44631: [Backport #9403]

* lib/delegate.rb (Delegator): keep source information methods
  which start and end with '__'.   [Bug #9155]
  which start and end with '__'.   [Bug #9403]

History

#1 Updated by Nobuyoshi Nakada over 1 year ago

  • Description updated (diff)

#2 Updated by Nobuyoshi Nakada over 1 year ago

  • Status changed from Open to Closed
  • % Done changed from 0 to 100

Applied in changeset r44631.


ChangeLog: fix ref

  • ChangeLog: fix ML number and ticket number of r44630. [Bug #9403]

#3 Updated by Nobuyoshi Nakada over 1 year ago

  • Backport changed from 1.9.3: UNKNOWN, 2.0.0: UNKNOWN, 2.1: UNKNOWN to 1.9.3: DONTNEED, 2.0.0: DONTNEED, 2.1: REQUIRED

#4 Updated by Nobuyoshi Nakada over 1 year ago

  • Project changed from Ruby trunk to Backport21
  • Tracker changed from Bug to Backport
  • Status changed from Closed to Assigned
  • Assignee set to Yui NARUSE

#5 Updated by Yui NARUSE over 1 year ago

  • Status changed from Assigned to Closed

Applied in changeset r44794.


merge revision(s) 44630,44631: [Backport #9403]

* lib/delegate.rb (Delegator): keep source information methods
  which start and end with '__'.   [Bug #9155]
  which start and end with '__'.   [Bug #9403]

Also available in: Atom PDF