From: Florian From Date: 2004-02-27T22:19:29+09:00 Subject: Re: Enumerable#zip(aRange) does not work ? On 2004-02-27 06:34:48 +0900, gabriele renzi wrote: > >> puts (1..10).zip(21..30) > TypeError: cannot convert Range into Array > > I wonder why this happens: would'nt make much more sense if it just > applied to_ary to it's argument? The problem is that Range doesn't define a to_ary method to convert it to an array. (And that is probably the correct behaviour because ranges can be very large.) A possible fix would be to check if an argument of zip has a to_a method and call that method instead of/additional to the to_ary call. -- _="puts'_='+_.inspect+';'+_";puts'_='+_.inspect+';'+_