--pgp-sign-Multipart_Tue_Jun__3_13:39:51_2008-1
Content-Type: text/plain; charset=US-ASCII

At Tue, 3 Jun 2008 10:13:07 +0900,
David A. Black wrote:
> I'm just wondering about this:
>
> >> RUBY_DESCRIPTION
> "ruby 1.9.0 (2008-06-03 revision 16244) [i686-darwin9.2.2]"
> >> require 'set'
> true
> >> s  et.new(1..10)
> #<Set: {1, 2, 3, 4, 5, 6, 7, 8, 9, 10}>
> >> s.map {|e| e + 10 }
> [11, 12, 13, 14, 15, 16, 17, 18, 19, 20]
> >> s.map! {|e| e + 10 }
> #<Set: {11, 12, 13, 14, 15, 16, 17, 18, 19, 20}>
>
> 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.

Sounds reasonable, considering in addition that Array#map and
Array#select supports subclasses.

I'll commit the change trunk.  Thanks.

--
Akinori MUSHA / http://akinori.org/

--pgp-sign-Multipart_Tue_Jun__3_13:39:51_2008-1
Content-Type: application/pgp-signature
Content-Transfer-Encoding: 7bit

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (FreeBSD)

iEYEABECAAYFAkhEyxcACgkQkgvvx5/Z4e7hawCdGhgWauQKiOhGcus/kEIG/XUW
L60AoMLin86Wa95Q24VLW34MTctJ2ELS
qB
-----END PGP SIGNATURE-----

--pgp-sign-Multipart_Tue_Jun__3_13:39:51_2008-1--