What is the difference between
10.6.to_i
and
10.6.to_int ?
views:
179answers:
2to_i and to_int may give the same result for 10.6, but "42".to_i works, whereas "42".to_int raises a NoMethodError, for reasons given in kgiannakakis's link.
Andrew Grimm
2009-05-11 05:01:00