Hal,
See ruby-talk 77500. I know the code was changed due to a segfault I
discovered when screwing around with collect (aka map). The thread also
includes the changes that were made.
I don’t know for sure that it’s related, but there you go.
Regards,
Dan
···
-----Original Message-----
From: Hal Fulton [mailto:hal9000@hypermetrics.com]
Sent: Thursday, August 28, 2003 9:49 AM
To: ruby-talk@ruby-lang.org
Subject: #collect with block modifying receiverHello, all…
I’m wondering what should be the behavior of collect when the
block modifies the receiver.I don’t recall thinking about this before, but I would have
said that the collect always returns as many items as the
array had at the time of the call.Has this somehow changed since 1.6.*?