Issue #4889 has been updated by Tomoyuki Chikanaga.

Category set to core
Status changed from Open to Closed
Assignee set to 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,
----------------------------------------
Bug #4889: methods defined using define_singleton_method in Array.each loop report wrong __method__
http://redmine.ruby-lang.org/issues/4889

Author: Ryan Biesemeyer
Status: Closed
Priority: Normal
Assignee: Tomoyuki Chikanaga
Category: core
Target version: 1.9.2
ruby -v: ruby 1.9.2p180 (2011-02-18) [i386-mingw32] 


--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


-- 
http://redmine.ruby-lang.org