From: Eric Christopherson Date: 2013-02-24T06:12:33+09:00 Subject: Re: why "Range" not worked on "to_ary" ? On Sat, Feb 23, 2013 at 2:35 PM, Xavier R. wrote: > yes,you are right. Now I have one thing to say that- > > Array#try_convert(obj) : If obj is not already an array, attempts to > convert it to one by calling its 'to_ary' method. > > I have no handy example for that method here to paste,thus couldn't. > Question is why then such implementation? #to_ary is used to convert things that are fundamentally array-like, i.e. they can be used in places (usually standard library methods) where arrays can be used. A range is not fundamentally like an array, because it doesn't consist of a finite number of elements (or really any "elements" at all unless you want to count the endpoints). #to_a is used to convert things in a way that's dictated by convention, rather than a way that's inherent to the data themselves.