=begin
This issue was solved with changeset r26801.
Marc-Andre, thank you for reporting this issue.
Your contribution to Ruby is greatly appreciated.
May Ruby be with you.
I don't think so. It returns a collection of values given from the
block. Array is a representation of collection. Matrix#collect
now returns Matrix, but I consider it caused by misunderstanding.
=begin
I'm probably crazy, and I must be the only one wishing this, but I wish that #collect was used to collect elements (and always returned an array), while #map was used to map an object by applying a functor to its element (and returned the original class when possible, like Set, Matrix, ...)
I'm probably crazy, and I must be the only one wishing this, but I wish
that #collect was used to collect elements (and always returned an array),
while #map was used to map an object by applying a functor to its element
(and returned the original class when possible, like Set, Matrix, ...)
I think Vector#to_a#map is better than Vector#collect, since it's far more
explicit for that purpose
I agree with the fact methods like map should return their own kind of
Enumerable (for example sorting a Hash result in ... an Array)
=end