From: Jamis Buck Date: 2004-10-11T11:57:28+09:00 Subject: Re: Trouble with rb_define_method("var=") Guilherme T. wrote: > ----- Ruby code > > class EntityB < Entity > def daemon() > @a=xs > xs=0.1 > xs=xs > end > end > Assignments to setter methods like this require an explicit reciever, so you have to say: self.xs = 0.1 Otherwise, Ruby interprets the 'xs' as a local variable. - Jamis -- Jamis Buck jgb3@email.byu.edu http://www.jamisbuck.org/jamis