On 2/28/06, Minkoo Seo <minkoo.seo@[...].com> 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