Project

General

Profile

Actions

Bug #4889

closed

methods defined using define_singleton_method in Array.each loop report wrong __method__

Added by yaauie (Ryan Biesemeyer) almost 13 years ago. Updated almost 13 years ago.

Status:
Closed
Target version:
ruby -v:
ruby 1.9.2p180 (2011-02-18) [i386-mingw32]
Backport:
[ruby-core:37157]

Description

--CODE--
class A
[:foo,:bar].each do |a|
define_singleton_method(a) do
puts method
end
end
nil
end
A.foo
A.bar
exit
--EXPECTED-RESULT--
foo
bar
--ACTUAL-RESULT--
bar
bar


Related issues 1 (0 open1 closed)

Is duplicate of Ruby master - Bug #4606: Regression of __method__ on 1.9ClosedActions

Updated by nagachika (Tomoyuki Chikanaga) almost 13 years ago

  • Category set to core
  • Status changed from Open to Closed
  • Assignee set to nagachika (Tomoyuki Chikanaga)
  • Target version set to 1.9.2

Hi, Ryan

Thank you for your report.

It is similar to #4606 and already fixed by r31436 in trunk and back ported to
ruby_1_9_2 branch by r31830.
Please wait coming release, or you can try with 1.9.2-head :)

Regards,

Actions

Also available in: Atom PDF

Like0
Like0