Iterating and Incrementing Strings in Ruby - Converting Strings (Page 5 of 6 )
You can convert a string into a float (Float) or integer (Fixnum). To convert a string into a float, or, more precisely, an instance of the Stringclass into an instance ofFloat, use theto_fmethod: