Hi --

On Tue, 3 Jun 2008, Yukihiro Matsumoto wrote:

> Hi,
>
> In message "Re: Set#map! vs. map"
>    on Tue, 3 Jun 2008 10:13:07 +0900, "David A. Black" <dblack / rubypal.com> writes:
>
> |I'm just wondering whether it would make more sense for Set to have a
> |#map method that returned a set, rather than an array, as long as that
> |behavior is considered meaningful (as it appears to be since that's
> |how Set#map! is working). Otherwise that aspect of the map/map!
> |distinction seems kind of arbitrary.
>
> Do you want to make a new rule that map should return the object of
> the same class as the receiver?  If so, what do you think collect
> (currently map's alias) should return?

I wasn't thinking of a general rule, just wondering about the case of
Set.


David

-- 
Rails training from David A. Black and Ruby Power and Light:
   INTRO TO RAILS         June 9-12            Berlin
   ADVANCING WITH RAILS   June 16-19           Berlin
See http://www.rubypal.com for details and updates!