I have list like this:
list = ["test1","test2","test3"]
I want to assign three associated variables with values. Like:
test1_var = "test1"
test2_var = "test2"
test3_var = "test3"
I ran a loop like this and got an error:
list.each { |x| eval(x+"_var") = x}
What is the correct way to do this?