From: Robert Klemme Date: 2005-12-15T20:03:26+09:00 Subject: Re: treating 'string'+var as method bmgz wrote: > I am a new Ruby recruit (thanks to *ahem*, Rails).. > What is the best way to do this: > > * obj.'string'+var as a method? > > I am currently using: > > * obj.send('string'+var) > > ..which works fine, but is this correct or bad practice? That's ok. As Ross pointed out you can also use obj.send("string#{var}"). But I would not use eval - there's just too much that can go wrong security wise. Kind regards robert