From: Jacob Fugal Date: 2005-09-13T00:54:52+09:00 Subject: Re: how to well-qualify the 2-inherited methods at their collision point On 9/11/05, Trans wrote: > def greeting > puts "greetings: #{@msg}. this is BaseModule." > super if defined?(super) # ==> will call greeting in Baseclass > end I'm not sure about that conditional... wouldn't that call super (with a possible exception) then check whether the result is "defined?" ? Or is "defined?" a special case keyword that does lazy evaluation on it's argument? > But if this is not your intent then there a "simple" way using Nano > Methods: > > require 'nano/object/superup' > > class SubClass < BaseClass > include BaseModule > def greeting > super > superup(BaseClass).greeting > end > end > > Note that I may be changing the name of this method to 'superfunc' in > the next release (b/c it works via a Functor). Deciding on a good name > for this method has been bothersome. If anyone has a better idea let me > know. Very nice, I like that functionality. Don't know if I like the name, but you already expressed your reservations on the name, and I don't have any better suggestions, so I'll just shut up. :) Jacob Fugal