What do you mean by it would work?  The first one will raise a
NameError, or the second one will output 3 ?

-Kurt

On Thu, Aug 21, 2003 at 01:56:44AM +0900, Yukihiro Matsumoto wrote:
> Hi,
> 
> In message "Re: for/in loop"
>     on 03/08/21, Paul Brannan <pbrannan / atdesk.com> writes:
> 
> |It's definitely not pointless:
> |
> |  for i in [1, 2, 3]
> |    x = i
> |  end
> |  p x #=> 3
> |  
> |  [1, 2, 3].each do
> |    y = i
> |  end
> |  p y #=> test.rb:9: undefined local variable or method `y' for #<Object:0x40289ce0> (NameError)
> 
> Yes, but it would work, when new scoping rule is introduced.
> 
> 							matz.
> 
>======= End of Original Message =======<