From: Yukihiro Matsumoto Date: 2007-11-27T16:32:01+09:00 Subject: Re: FEATURE SUGGESTION: Accept default value for to_f and to_i Hi, In message "Re: FEATURE SUGGESTION: Accept default value for to_f and to_i" on Tue, 27 Nov 2007 14:46:50 +0900, Mr Magpie writes: |3) because the result of to_i always evaluates to true, you can't do | num.to_i ? 'valid int' : 'invalid int' |but with my sugestion you could do | num.to_i(false) ? 'valid int' : 'invalid int' Argument for String#to_i is already taken for base specification, i.e. "abcd".to_i(16) # => 43981 matz.