nobu.nokada / softhome.net writes:

> Hi,
> 
> At Wed, 12 Jun 2002 11:00:45 +0900,
> Dave Thomas wrote:
> > > Should we perhaps take a vote and see how many folks have ruby
> > > programs that depend on block parameters referencing outer variables?
> > 
> > sum = 0
> > arr.each { |a|  sum += a }
> > p sum
> > 
> > 
> > (Very common before #inject came along...)
> 
> It's another scope issue, block parameter issue means:
> 
>   sum = 0
>   a = nil
>   arr.each { |a|  sum += a }
>   p sum
>   p a == arr.last	#=> true or false

True: I was incorrectly talking about the |a;sum| side of the question.

Dave