Tom Sawyer <transami / transami.net> writes:

> why couldn't ruby just check to see if there was such a setter method
> first, prior to assuming it a local variable assignment? the only
> consequence of this would be that you could not use local variable names
> identical to your method names. something i tend to do anyway.

It would have to check on every single assignment, at all times, in
your code.

   1000.times do |i|
     a = 1
     def a=(v)
        puts v
     end if i == 9987
   end


Dave