From: chiaro scuro Date: 2006-02-28T20:12:59+09:00 Subject: Re: Subclassing Struct.new On 2/28/06, Minkoo Seo wrote: > Hi group. > > Please have a look at the following: The following works for me. I suspect you should have used self inside the method class F < Struct.new(:n) def dec_n self.n -= 1 end end f = F.new 2 puts f.n == 2 f.dec_n puts f.n == 1 -- Chiaroscuro -- Liquid Development Blog: http://feeds.feedburner.com/blogspot/liquiddevelopment