Project

General

Profile

ActionsLike0

Bug #4606

closed

Regression of __method__ on 1.9

Added by zenspider (Ryan Davis) almost 14 years ago. Updated almost 14 years ago.

Status:
Closed
Assignee:
-
Target version:
-
ruby -v:
-
Backport:
[ruby-core:35386]

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


Related issues 1 (0 open1 closed)

Has duplicate Ruby - Bug #4889: methods defined using define_singleton_method in Array.each loop report wrong __method__Closednagachika (Tomoyuki Chikanaga)06/16/2011Actions
#1

Updated by nagachika (Tomoyuki Chikanaga) almost 14 years ago

  • Status changed from Open to Closed
  • % Done changed from 0 to 100
ActionsLike0

Also available in: Atom PDF