Bug #4058
closed__method__ does not return correct method name for aliased methods
Description
=begin
class Test
def my_method
method
end
alias_method :my_alias, :my_method
end
Hello.new.my_method #=> :my_method
Hello.new.my_alias #=> :my_method
I think that Hello.new.my_alias
should instead return :my_alias
=end
Updated by runpaint (Run Paint Run Run) about 14 years ago
=begin
This is intended. Originally, callee and method were equivalent, except in aliased methods where the former returned the aliased name, and the latter returned the non-aliased name. Then, later, matz changed _callee to be identical to method.
=end
Updated by runpaint (Run Paint Run Run) almost 14 years ago
=begin
This is intended. Originally, callee and method were equivalent, except in aliased methods where the former returned the
aliased name, and the latter returned the non-aliased name. Then, later, matz changed _callee to be identical to method.
Proof I'm not making this up: http://redmine.ruby-lang.org/repositories/revision/ruby-19?rev=14448 ;-). This can be closed.
=end
Updated by naruse (Yui NARUSE) over 13 years ago
- Status changed from Open to Closed
Updated by charlton (Charlton Wang) over 13 years ago
Is there any hope of getting callee functionality back at some point? I tried to write a ruby extension that provided a function to call what used to be called by callee but that doesn't appear to work. Has the VM changed to the point where we'll never get this functionality back?