Project

General

Profile

Actions

Bug #11046

closed

__callee__ returns incorrect method name in orphan proc

Added by ko1 (Koichi Sasada) about 9 years ago. Updated almost 9 years ago.

Status:
Closed
Target version:
-
ruby -v:
ruby 2.3.0dev (2015-04-07 trunk 50171) [i386-mswin32_110]
[ruby-core:<unknown>]

Description

callee returns incorrect method name in orphan proc.

def foo
  1.times{
    p __callee__
  }
  proc{
    __callee__
  }
end

alias bar foo

pr = bar #=> :bar
GC.start
p pr.call #=> :foo

Reproduce on 2.0 to 2.3dev.

Actions

Also available in: Atom PDF

Like0
Like0Like0