From: Aaron Baldwin Date: 2008-02-07T05:39:45+09:00 Subject: alias_method from singleton_method_added I'm trying to alias a method at the point that method is defined. Here is an example that results in the error: NameError: undefined method 'foo' for class `Test'. class Test class << self def singleton_method_added(m) puts m alias_method :bar, :foo end def foo end end end How can I call alias_method from within singleton_method_added and access the singleton method? Thanks, Aaron