On Sunday, February 2, 2003, 12:39:04 AM, Yukihiro wrote:

> Hi,

> In message "Re: Local variables & blocks"
>     on 03/02/01, Brian Candler <B.Candler / pobox.com> writes:

> |x = 10
> |[1,2,3].each { |x| thisval = x }
> |puts x
> |
> |A warning will be generated, but will the final value printed be 10 or 3?

> 10.

Sorry for being so dense.  Can you confirm the propsed output of the
following code?  I swear I have read every post in this thread, and not
really understood.

  [1,2,3].each { |x| thisval = x }
  puts x

Thanks,
Gavin