On Sun, 13 Jun 2004 21:31:27 +0200, Dirk Einecke wrote:
> 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"

puts eval "p.#{s}"

-- 
Marek Janukowicz