From: Daniel Lucraft Date: 2008-03-06T23:48:45+09:00 Subject: Re: Cloning a module and isolating it from the clone Earle Clubb wrote: > The > result I'm trying to achieve is the same as if I had copied the module > source code and renamed the module. I think stud number 7 was onto something. How about this: CommonDef = %q{ def self.hello puts "hello from #{self}" end } module A module_eval CommonDef end module B module_eval CommonDef end A.hello B.hello module B def self.hello puts "different hello" end end A.hello B.hello ===> hello from A hello from B hello from A different hello _______ Seems to work right. best, Dan -- Posted via http://www.ruby-forum.com/.