> -----Original Message-----
> From: Yukihiro Matsumoto [mailto:matz / ruby-lang.org] 
> Sent: Monday, June 23, 2008 9:32 AM
> To: ruby-core / ruby-lang.org
> Subject: [ruby-core:17382] Re: A faster Array#delete
> 
> Hi,
> 
> In message "Re: [ruby-core:17381] Re: A faster Array#delete"
>     on Tue, 24 Jun 2008 00:15:47 +0900, "Berger, Daniel" 
> <Daniel.Berger / qwest.com> writes:
> 
> |>Besides that, it
> |> doesn't work well (out of bound access) if the comparing  method 
> |>alters (e.g. shorten) the receiver.
> |
> |Can you give us some examples? They would be useful test cases.
> 
> Your version would have access violation with the following program.
> 
> 							matz.

Actually, a patched version doesn't segfault. However, my version does
not seem to honor custom the custom '==' method, because $array ought to
be empty. I'm not actually sure why, though. I guess calling rb_equal()
isn't enough to trigger it? I'm not sure.

In any case, ensuring that Array#delete honors a custom Object#== method
is a good test to add.

Thanks,

Dan


This communication is the property of Qwest and may contain confidential or
privileged information. Unauthorized use of this communication is strictly 
prohibited and may be unlawful.  If you have received this communication n error, please immediately notify the sender by reply e-mail and destroy 
all copies of the communication and any attachments.