From: Travis Whitton Date: 2002-09-27T08:38:22+09:00 Subject: Re: Ruby - common pitfalls? a = 0 1.upto(3) do |a| # some code end # a is now 3 Iterators don't introduce a new scope for previously defined variables. It's in the documentation but anybody who's just learning "on the fly" will certainly find this surprising. It's my least favorite feature about Ruby because while everything else feels right, it feels dead wrong(coming from Perl's lexical scoping rules). - Travis Whitton