From: ts Date: 2002-06-24T21:23:58+09:00 Subject: Re: No exceptions from String#to_i >>>>> "N" == Nikodemus Siivola writes: N> Integer(nil) == 0 nil.to_i is defined N> Integer(false) #-> exception false.to_i is not defined N> Array(foo) == foo.to_a Well, first ruby look if #to_ary exist and call it otherwise it try to call #to_a N> Integer(foo) != foo.to_i N> Float(foo) != foo.to_f it depend of foo pigeon% ruby class A def to_f 12.0 end end p Float(A.new) ^D 12.0 pigeon% Guy Decoux