Not really, you can use eval though:
@minus = " - "
x = eval(3.to_s + @minus + 2.to_s)
eval is
evil, however.* And a better alternative is to store the operation in a procedure. Something like:
@minus = Proc.new { |a, b| a - b }
x = @minus.call(3, 2)
* If you are new to the language, I really suggest not using eval, there are often better ways to do things without using it. It's a security risk and a performance hit, and just bad coding style in general.