From: dblack@... Date: 2002-12-04T20:57:10+09:00 Subject: Re: Class variables problem Hi -- On Wed, 4 Dec 2002, Peter Hickman wrote: > ts wrote: > > pigeon% ruby > > class Test > > def Test.Calc(x) > > return @rate * x > > end > > end > > > > class Fred < Test > > @rate = 10 > > end > > > > puts Fred.Calc(12) > > ^D > > 120 > > pigeon% > > > > > > Guy Decoux > > It never occured to me that instance variables would be usable without > an instance. They're not :-) You've got two instances here (the Class objects Test and Fred). David -- David Alan Black home: dblack@candle.superlink.net work: blackdav@shu.edu Web: http://pirate.shu.edu/~blackdav