From: Ari Brown Date: 2007-07-24T06:19:06+09:00 Subject: Variable Generation yes, I mean spontaneously generated variables. Assume we have an array: array = %w(yea cool awesome stuff) Now, I'm looking to make a variable corresponding to the item. so that: yea = "yea" cool = "cool" awesome = "awesome" stuff = "stuff" My current method (which FAILS) is using eval array.each {|item| eval(item + "=\"#{item}\"") } I tested this with a puts instead of eval, and it comes out exactly as it should. But when I try to use the variable, I get a undefined local variable or method error. Bwah? -------------------------------------------------------| ~ Ari crap my sig won't fit