 <p>You call <code>to_i</code>, you get integer.</p> <p>Try calling <code>to_f</code>, you should get a float.</p> <p>For more string conversion methods, <a href="http://ruby-doc.org/core-1.9.3/String.html#method-i-to_c">look here</a>.</p>