Forum: Ruby alias_method, return new name instead of class

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
45196398e9685000d195ec626d477f0e?d=identicon&s=25 transfire (Guest)
on 2005-11-23 19:48
(Received via mailing list)
Might be nice is #alias_method returned the new method name so that one
could do:

  private alias_method( :foo, :bar )

b/c

  private
  alias_method :foo, :bar

doesn't work.

Right now it appears to return the class/module involved.

Just a thought,
T.
This topic is locked and can not be replied to.