From: rubyrus Date: 2006-02-28T22:53:45+09:00 Subject: Same variable name used in block and local question Can anybody help me here, TIA!! This is the code. I expect to see the string "Afterward:turkey", but why am I getting "Afterward:camel"? |animal| parameter in a block should be temporary inside the block, right?? Code: ---------- animal = "turkey" puts "Original:" + animal puts ["cow","camel"].each { |animal| puts "in block:" + animal } puts puts "Afterwards:" + animal Output: ----------- Original:turkey in block:cow in block:camel Afterwards:camel