Hi (again),

In "Programing Ruby: The Pragmatic Programmers Guide (2dn Ed.)" Book, 
pp. 333:
<quote>
Block parameters are assigned values when the block is invoked.
...
If a local variable (including a block parameter) is first assigned in a 
block, it is local to the block. If instead a variable of the same name 
is already established at the time the block executes, the block will 
inherit that variable.
</quote>

As far as i can see in that text it describes (spec's)
x = 1
(2..3).each {|x|}
p x
=> 3
to a correct case..

I need to know:
1) Is this the behavior we should expect from the ruby language (1.8)?
2) Since ruby (1.9) does not behave the same way:
x = 1
(2..3).each {|x|}
p x
=> 1
what should be the spec for block parameters?

Thanks (once more),
Vasco
-- 
Posted via http://www.ruby-forum.com/.