From: murphy Date: 2007-12-17T20:20:58+09:00 Subject: Re: Enumerable#uniq, anybody? Martin Duerst wrote: > However, it looks somewhat ugly and unnecessary, and it isn't compatible > with 1.8. This could easily be fixed by adding uniq to Enumerator, the > simplest form being: > def uniq > to_a.uniq > end the current implementation of uniq depends on the receiver being converted into a hash table (to make it O(m) instead of O(m**2)). you probably wouldn't expect that from an enumerator...to_a makes it clear, though. [murphy]