Project

General

Profile

Actions

Backport #9403

closed

Incorrect __callee__ in delegate classes

Added by avdi (Avdi Grimm) over 10 years ago. Updated about 10 years ago.

Status:
Closed
[ruby-core:<unknown>]

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

Files

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

Updated by nobu (Nobuyoshi Nakada) over 10 years ago

  • Description updated (diff)

Updated by nobu (Nobuyoshi Nakada) over 10 years ago

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

Applied in changeset r44631.


ChangeLog: fix ref

Updated by nobu (Nobuyoshi Nakada) over 10 years 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

Updated by nobu (Nobuyoshi Nakada) over 10 years ago

  • Tracker changed from Bug to Backport
  • Project changed from Ruby master to Backport21
  • Status changed from Closed to Assigned
  • Assignee set to naruse (Yui NARUSE)

Updated by naruse (Yui NARUSE) about 10 years 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 '__'.  [ruby-core:58572] [Bug #9155]
  which start and end with '__'.  [ruby-core:59718] [Bug #9403]
Actions

Also available in: Atom PDF

Like0
Like0Like0Like0Like0Like0