From: Christoph Date: 2002-09-24T03:58:41+09:00 Subject: Re: self as method argument revisited wrote in message news:Pine.LNX.4.44.0209230935140.7789-100000@candle.superlink.net... > Hi -- > > On Mon, 23 Sep 2002, Christoph wrote: > > > "Christoph" wrote > > .... > > > class DBDB # 1.7 version > > > class Row > > > ... > > > @row_class = self > > whops that should have been;-) > > > > @db = nil > > Sorry, I misquoted this post in my last answer. But why do you need > to set this to nil? I guess pure esthetics - the RC (ruby correct) solution might be class DBDB class Row classs << self def db if equal? Row raise ArgumentError, "Abstract Row class ... " else @db end end attr_writer :db .... end Anyway I think it is a very interesting approach ... I guess it should be possible to pack the clone,dup, inherited whatever headache into an extension ... /Christoph