From: CBlair1986 Date: 2007-01-23T14:50:07+09:00 Subject: Re: attr_accessor weirdness, or something Phrogz wrote: > CBlair1986 wrote: > > def update_timer > > timer = Time.now > > end > > Ruby can't tell if you mean: > a) Call the method named "timer=" and pass it the value of Time.now, or > b) Set the local variable named "timer" to the value of Time.now. > > It chooses the latter interpretation, when you meant the former. To > help the interpretter out, write that as: > self.timer = Time.now > instead. (This is slightly better, though slightly slower, than > directly accessing the instance variable, in case you alter want to > change what happens in your time= setter method.) Thank you, Phrogz! Thinking on it now, it's obvious. Must've had a late night, I guess. Thanks again, all!