From: gwtmp01@... Date: 2006-01-20T23:36:50+09:00 Subject: Re: strict pragma & scope On Jan 20, 2006, at 5:41 AM, Tom Allison wrote: > Scope. It seems that there are some different approaches to > scope. For example, objects created in a loop remain in scope > after you leave the scope of the iterator. So my favorite > temporary variables of i, x, foo, and bar are all now permanent > variable elements in my code blocks from their first use. > True/False? The non-block looping constructs: while, unless, for/in do *not* create a new scope. The block looping constructs: each, loop do create a new scope. The scoping behavior exists because of the block, not because the methods each or loop have some special properties. So basically your question is about blocks, not about loops. Matz has acknowledge that the behavior of block arguments and block local variables is confusing and is exploring some alternatives. See Austin's post for an illustration of the current behavior of block arguments and local variables within a block. Gary Wright