From: Jeff Mitchell Date: 2004-06-14T04:48:04+09:00 Subject: Re: Use a string a object name --- Dirk Einecke wrote: > 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" Did you mean, puts eval "p s" # => "name" __________________________________ Do you Yahoo!? Friends. Fun. Try the all-new Yahoo! Messenger. http://messenger.yahoo.com/