From: Steven Brown Date: 2001-08-14T00:06:18+09:00 Subject: [ruby-talk:19639] Local variables - can {|a| ..} be made to have 'a' local? I'm in the process of learning ruby and I've got a quick question for you guru folk.. Is there a way to make {|variable| ...} blocks such that the 'variable' is local to that block only? Eg, so the following code would work instead of 'a' winding up 5: a = 9 [1,3,5].each {|a| puts a} print "should be 9: ", a, "\n"; As a side question, is there anything like 'const' in ruby to assure one that a function won't decide to modify the variable passed to it?