From: Boson Date: 2008-04-11T00:30:07+09:00 Subject: Re: What should this print? Gregory Seidman wrote: > It's not especially interesting. The block passed to each has a local > variable, x, which is nil in the second iteration because it has never been > set. The for loop does not create a new scope, thus the x variable retains > the value it was set to in the previous iteration, i.e. 1. Thanks Greg, I'll read up on the creation of scope. I'd assumed that "for" was just syntactic sugar for "each".