From: Dave Thomas Date: 2000-10-11T14:16:19+09:00 Subject: [ruby-talk:5412] Re: Object.foo, setters and so on "Hal E. Fulton" writes: > What does this entry in the FAQ mean? say you have class Dave def fred @fred end def fred=(n) @fred = n end def test fred = 99 end end You might be tempted to think that the line 'fred = 99' in method 'test' calls the method 'fred='. After all, method calls in functional form have 'self.' implicitly prepended, right? Unfortunately not. In this case, Ruby will look at 'fred = 99' and simply assign 99 to a local variable 'fred'. To invoke the setter method, you need to make the self. explicit: def test self.fred = 99 end Regards Dave