From: Brian Candler Date: 2010-05-05T00:09:50+09:00 Subject: Re: Something I expected to work, but didn't! Matthew K. Williams wrote: > Now, you could say: > [x, y].each {|v| v += z} Except that does nothing except calculate values and throw them away (since v drops out of scope at the end of the block). x and y are unchanged. Local variables are not objects, and you can't get "references" to them. You'd have to do something awful with eval to get the effect you want: ["x", "y"].each { |v| eval "#{v} += z" } -- Posted via http://www.ruby-forum.com/.