From: Yukihiro Matsumoto Date: 2006-09-26T07:50:04+09:00 Subject: Re: How to copy a method from one class to another Hi, In message "Re: How to copy a method from one class to another" on Tue, 26 Sep 2006 05:15:20 +0900, "Sam Kong" writes: |Mix-in is the right way in Ruby. |However, for mix-in, all things should be designed before |implementation. If you are not allowed to modify existing classes. Most of the cases rewriting class C1 def f p self.class end end to module M1 def f p self.class end end class C1 include M1 end class C2 include M1 end is trivial. You don't need to design everything before implementation, but just have to evolve classes. If you are not allowed to modify pre-existing class, you need to use some kind of delegation. matz.