From: 7stud -- Date: 2007-10-16T02:50:14+09:00 Subject: Re: Parameter in a block is not local? SpringFlowers AutumnMoon wrote: > > I thought a iterator with a block is like an nameless function call... > Here's another example(a modification of the example found in pickaxe2, p 106): if false data = "hello" end (1..3).each {data = "goodbye"} puts data --output:-- goodbye That is equivalent to Java's call by value--but using references and C++ reference semantics, and the flat scope is converted to spheric scope with assignment semantics applying throughout any call by value passing. :) -- Posted via http://www.ruby-forum.com/.