Hi --

On Thu, 25 Jul 2002, Tom Sawyer wrote:

>             @value = fxrb.to_s
>             self.value=fxrb.to_s  # why do i have to use self here?

If you don't specify the receiver in "self.value = ...", Ruby will
interpret "value = " as meaning that value is a local variable, rather
than a method.  That's how Ruby disambiguates such expressions -- so
if you want it to be a method call, you have to disambiguate it in the
other direction by specifying "self".


David

-- 
David Alan Black
home: dblack / candle.superlink.net
work: blackdav / shu.edu
Web:  http://pirate.shu.edu/~blackdav