Actions
Bug #4889
closedmethods defined using define_singleton_method in Array.each loop report wrong __method__
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
Updated by nagachika (Tomoyuki Chikanaga) over 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
Like0
Like0