From: Kristof Bastiaensen Date: 2005-05-22T18:45:16+09:00 Subject: Re: join not in Enumerable On Sun, 22 May 2005 11:05:10 +0900, David A. Black wrote: >> Why is join, and perhaps even pack in Array and not in Enumerable? > > I guess to_a makes the conversion pretty easy, and Array tends to > serve as the "normalized" version of Enumerable in a lot of contexts. > I don't know if there's any other reason. I believe because join requires an ordered collection, and enumerables aren't guaranteed to be ordered. For example the order of traversing a Hash may differ for a different hash with the same elements. For this reason the output of join for an enumerable is undefined. Regards, KB