D
Dirk Einecke
Hi.
I've a little problem. How can I use a string use as an object name?
That works well:
puts p.name # -> dirk
But how can I use the string s as object name, I tried eval but I the
result is not good. Where is my mistake. Can anybody help me?
s = 'name'
puts eval "p.s"
greetings
Dirk Einecke
I've a little problem. How can I use a string use as an object name?
That works well:
puts p.name # -> dirk
But how can I use the string s as object name, I tried eval but I the
result is not good. Where is my mistake. Can anybody help me?
s = 'name'
puts eval "p.s"
greetings
Dirk Einecke