I
Iñaki Baz Castillo
Hi, I want to convert a string to a Float value:
irb> "1.5".to_f
=3D> 1.5
But if I do:
irb> "1".to_f
=3D> 1.0
I get '1.0' instead of just '1'. Is not possible to just get '1' in this ca=
se?
Thanks a lot.
=2D-=20
I=C3=B1aki Baz Castillo
irb> "1.5".to_f
=3D> 1.5
But if I do:
irb> "1".to_f
=3D> 1.0
I get '1.0' instead of just '1'. Is not possible to just get '1' in this ca=
se?
Thanks a lot.
=2D-=20
I=C3=B1aki Baz Castillo