On 9/28/05, Eric Mahurin <eric_mahurin / yahoo.com> wrote:
> --- ts <decoux / moulon.inra.fr> wrote:
>
> > >>>>> "M" == Michael Roth <mroth / nessie.de> writes:
> >

> To me, it seems like a bug that the for loop isn't equivalent
> to the each loop.  I think it is putting multi in the
> surrounding scope because of the syntactic order - multi comes
> before the Enumerable.

It's an alternate form that has different scoping, similar to {} and do/end
which have different precedence.

I wouldn't consider it a bug. I would just consider it a very good reason
to never use a 'for' loop in a Ruby program. :)

--
Jim Freeze
WARNING: The Ruby populace has determined that using 'for'
loops in a Ruby script may be harmful to your health. You should
consult a pure Rubyist (who doesn't have ties to Perl or C) before
using this feature.