Hi,
In message "[ruby-talk:7950] Re: defined? problem?"
on 00/12/22, Stephen White <steve / deaf.org> writes:
| irb(main):007:0> b
| NameError: undefined local variable or method `b' for #<Object:0x40181ce0>
| (irb):7:in `irb_binding'
| irb(main):008:0> b = 6 if false
| nil
| irb(main):009:0> b
| nil
|
|whereas I was expecting another "undefined local variable" error.
Hmm, I consider dynamic declaration harmful. It appears natual at the
first sight, but not really. I hate local variables vary defined or
undefined time to time. Think about it.
matz.