From: Robert Dober Date: 2009-08-12T15:39:41+09:00 Subject: Re: Which initialize method? (or, who is self?) On Tue, Aug 11, 2009 at 10:10 PM, Robert Klemme wrote: > On 11.08.2009 21:23, Daniel Waite wrote: Well analyzed, I did not really get it. I ask myself if this is not a violation of one of the principles of OO design? Base.hexdigest assumes that the implementer of subclasses' new will do the right thing, that is call super( ) with the right params or implement allocate and send :initialize the right way. This is clearly a superclass relying/imposing subclass behavior, not what I learnt. Well I do not say it must not be done, but at least it merits prominent documentation, so that less inspired folks than you Robert, that is poor OP and me ;), get it too. Maybe this shows better what I mean http://pastie.org/580961 Cheers Robert -- module Kernel alias_method :ë, :lambda end