From: Simon Krahnke Date: 2009-10-20T08:05:07+09:00 Subject: Re: Tip du jour: no need to chomp before to_i * Robert Klemme (2009-10-13) schrieb: > Basically Integer applies the same semantics as the Ruby parser while > #to_i just grabs the first sequence of digits, treats it as a decimal > number and turns it into an int. If there is no such sequence it falls > back to 0. A little correction: to_i is passed the radix, which by default is 10. It will return zero if the first character is not the set of digits for that radix, otherwise it will turn the run of digits at the front of the string into an integer according to the radix. mfg, simon .... l