Actions
Bug #4606
closedRegression of __method__ on 1.9
Description
=begin
As found on:
http://stackoverflow.com/questions/5129798
class Testing
[:one, :two].each do |name|
define_method(name) do
puts method
end
end
end
t = Testing.new
t.one # => two
t.two # => two
Output is correct in 1.8.7, but not in 1.9.2.
=end
Updated by nagachika (Tomoyuki Chikanaga) over 13 years ago
- Status changed from Open to Closed
- % Done changed from 0 to 100
This issue was solved with changeset r31436.
Ryan, thank you for reporting this issue.
Your contribution to Ruby is greatly appreciated.
May Ruby be with you.
- eval.c (frame_func_id): method return different name from
methods defined by Module#define_method with a same block.
[ruby-core:35386] fixes #4606- eval (method_entry_of_iseq): new helper function. search control
frame stack for a method entry which has given iseq. - test/ruby/test_method.rb: add tests for #4696
- eval (method_entry_of_iseq): new helper function. search control
Actions
Like0
Like0