Ralph Shnelvar wrote in post #970469:
> Marnen Laibow-Koser wrote in post #969841:
>> You're using eval (almost never necessary in Ruby --
>> send is usually what you want).
>
> How in Ruby does one create a variable and then set a value for it
> without using eval?

There are several methods to do just that.  But I don't think that's 
actually what you want here.
>
> That is, I have a string named "xyz" and I want to create a variable
> named xyz and assign the string "abc" to it.

As I said in my earlier post, I think you're approaching this wrong. 
Please give more information about what you're actually trying to 
achieve (rather than the surrogate goal you've set for yourself) and 
we'll see what we can come up with.  (You probably don't need those 
variables in the first place.)

Best,
-- 
Marnen Laibow-Koser
http://www.marnen.org
[email protected]

Sent from my iPhone

-- 
Posted via http://www.ruby-forum.com/.

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.

Reply via email to