From: Sean O'Halpin Date: 2009-02-03T09:40:04+09:00 Subject: Re: Is this possible in Ruby On Tue, Feb 3, 2009 at 12:12 AM, List.rb wrote: > > I thought in 1.8.6 it could be done.. Not positive though > > a, b = 3, 5 > formula="a*b" > p eval(formula) > > D'oh. You're absolutely right. Maybe I was thinking of this: a = 1 b = 2 def some_eval(context) eval('a + b', context) end some_eval(binding) # => 3 Late night. Off to bed :) Regards, Sean