From: "T. Onoma" Date: 2003-12-10T02:46:18+09:00 Subject: Re: Inheriting variables, super, and "not super"? On Tuesday 09 December 2003 06:17 pm, Hugh Sasse Staff Elec Eng wrote: > > Is there an idiom like > > class Y < Z > def initialize() > @y_var = 0 > if self.class == Y > y_init > end > end > end > > > class X < Y > def initialize > super > @x_var = 0 > end > end I'm not sure I understand you, but I'm interested in what it is you are attempting. Might you not use a redefinable responder method? (aka don't forget about our tusting duck typing ;) class Y < Z def initialize() @y_var = 0 if initiator == Y y_init end end def initiator Y end end class X < Y def initialize super @x_var = 0 end def initiator X end end T. > Any ideas? Apart from "If you're in a hole, stop digging" :-) Dig to China! :)