From: Hans Mackowiak Date: 2013-03-10T05:23:58+09:00 Subject: Re: type casting and connversion in ruby sample: [4,5,6][1.2] #=>5 this works because Array#[] calls to_int if the index is no Integer, thats why Numeric works too String does define to_i but no to_int, so [4,5,6]["1.2"] #=> TypeError -- Posted via http://www.ruby-forum.com/.