From: Joel VanderWerf Date: 2004-06-04T04:21:23+09:00 Subject: Re: entries / to_a Johan Holmberg wrote: > Hi ! > > The Enumerable module defines the two methods "entries" and "to_a" > as synonyms for the same thing. Some classes that mix-in Enumerable > re-implement "to_a" but *not* "entries". Sometimes this is ok, but > in the case of the Array class I think this is a bad thing. It might be valuable to have both functionalities available. If #entries consistently means "Return a new array containing the items in _enum_.", then you can always be sure you're getting a copy. There may be code somewhere that relies on this behavior. Unfortunately, the ri docs say "Returns an array containing the items in _enum_.", which doesn't quite settle the ambiguity. It doesn't help that Enumerable#to_a and Enumerable#entries share the same ri page without mentioning that classes that mix in Enumerable can treat them differently.