I am a newbee in Ruby and since the language has many nice features it
struck me obvioous that it must be possible to evaluate a string in
such a way that it produces the corresponding operator. E.g.: "+"
would become a simple plus sign, thus allowing me to pass "+" as a
function to be done on two integers.
I am a newbee in Ruby and since the language has many nice features it
struck me obvioous that it must be possible to evaluate a string in
such a way that it produces the corresponding operator. E.g.: "+"
would become a simple plus sign, thus allowing me to pass "+" as a
function to be done on two integers.
On Apr 17, 3:22 am, Marc Heiler <sheve...@linuxmail.org> wrote:
kelt wrote:
> Hey,
> I am a newbee in Ruby and since the language has many nice features it
> struck me obvioous that it must be possible to evaluate a string in
> such a way that it produces the corresponding operator. E.g.: "+"
> would become a simple plus sign, thus allowing me to pass "+" as a
> function to be done on two integers.