Actions
Bug #12761
closedRuby 2.3.1 has a bug in `Module#alias` and `Module#alias_method`
Bug #12761: Ruby 2.3.1 has a bug in `Module#alias` and `Module#alias_method`
Status:
Closed
Assignee:
-
Target version:
-
ruby -v:
ruby 2.3.1p112 (2016-04-26 revision 54768) [x86_64-linux], ruby 2.3.0p0 (2015-12-25 revision 53290) [x86_64-linux]
Backport:
Description
Consider the following code:
module M def original ; puts __callee__ ; end alias_method :aliased, :original end class A include M end A.new.original #⇒ original A.new.aliased #⇒ aliased The above code runs perfectly fine in Ruby 2.1 and returns the actual method name, as it is supposed to be done by Kernel#__callee__.
Surprisingly enough, the code above does not work as expected in Ruby 2.3.1:
A.new.original #⇒ original A.new.aliased #⇒ original The same happens for alias as well.
Actions