From: Alex Gutteridge Date: 2007-08-28T18:36:11+09:00 Subject: Re: ''Macro'' operator On 28 Aug 2007, at 18:28, Damjan Rems wrote: > > It is probably called different in ruby, but what I want to achive is: > > a1=10 > r= ?('a' + '1') # ? is whatever, r should have value 10 ? is eval: irb(main):001:0> a1 = 10 => 10 irb(main):002:0> r = eval('a'+'1') => 10 There are almost always better ways of doing something than using eval though. If you post what you are trying to do someone may be able to suggest an alternative. Alex Gutteridge Bioinformatics Center Kyoto University