From: Matt Armstrong Date: 2003-01-04T03:28:11+09:00 Subject: Re: How do I alias_method class methods? ts writes: >>>>>> "M" == Matt Armstrong writes: > > M> def do_substitute > M> module_eval { alias_method :do_it, :substitute_do_it } > M> end > > def do_substitute > class << self > alias_method :do_it, :substitute_do_it > end > end Thanks -- I also discovered instance_eval def do_substitute code <<-CODE class << self alias_method :do_it, :substitute_do_it end CODE instance_eval(code) end I went this way because the code is dynamically generated (more complex than the above example).