From: Josh Cheek Date: 2011-05-26T18:57:45+09:00 Subject: Re: "Local variable within code blocks do not interfere with those outside the block" On Thu, May 26, 2011 at 4:20 AM, Bala TS wrote: > Here x is a variable(array_variable) it contains  5 elements > > x = [1,2,3,4,5] > > > x.each do |r|{puts "#{r}"} > end > > => the result like this order > 1 > 2 > 3 > 4 > 5 > I've never seen code like this in Ruby. In fact, I get a syntax error when I try to run this code: untitled:2: syntax error, unexpected tSTRING_BEG, expecting keyword_do or '{' or '(' x.each do |r|{puts "#{r}"} ^ untitled:2: syntax error, unexpected '}', expecting keyword_end