From: prizrak6@... Date: 2008-02-21T20:15:00+09:00 Subject: Re: Reusing the existing code. On 21 æÅ×, 13:02, MohsinHijazee wrote: > Hi! > š šI have a new class which needs to reuse the code in two classes. > But I can only derive it from one class. How should I go about it then? Use mixins, by defining modules Module A def afunc; 5; end end Module B def bfunc; 6; end end class AB include A include B end x AB.new x.afunc # -> 5 x.bfunc # -> 6