From: Hans Mackowiak Date: 2013-03-10T05:08:10+09:00 Subject: Re: type casting and connversion in ruby because ruby is very strong typed, it does not have casting per se, so without bad Hacks an object cant change its own type/class. so to_i and others are always conversion. but ruby has different kinds ... to_int is implicit conversion, but only exist for classes which are already a number. to_i is explicit conversion. it exist for other classes like String too when the core defined methods wants an Integer for sample, ruby automatic tries to call to_int, but not to_i for non-Integer there are other pairs too: to_ary - to_a to_hash - to_h to_str - to_s -- Posted via http://www.ruby-forum.com/.