From: Rich Kilmer Date: 2001-10-27T07:26:49+09:00 Subject: [ruby-talk:23557] Re: Fast reply needed: class var trouble because you defined: attr_accessor :t but are you saying that in the method: def set_default t = @@default_t end that "t" should call the method "t=" which the attr_accessor created? if so, I have experienced that before as well and use: def set_default self.t = @@default_t end to remove the ambiguity of Ruby trying to figure out whether I am trying to define a local var or invoke a method. -Rich > -----Original Message----- > From: Robert Feldt [mailto:feldt@ce.chalmers.se] > Sent: Friday, October 26, 2001 6:18 PM > To: ruby-talk ML > Subject: [ruby-talk:23555] Re: Fast reply needed: class var trouble > > > On Sat, 27 Oct 2001, Rich Kilmer wrote: > > > you forgot the @ sign (@t=@@default_t) > > > Oh, but that was my point: Why am I not allowed to call the instance > method t? I must be totaly out in the blue here, time to go to bed... ;-) > > I have Ruby version 1.7.1 2001-09-20, maybe that's the problem. > > /R >