I have to evaluate strings to get a result. For example,
eval('5*6.45').to_f # => 32.25
is expected.
Why do I get:
eval('7/14').to_f # => 0.0
instead of 0.5
? How can I get the appropriate value? In my game (GUI), I should have 14
and not 14.0
.