=20

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

Actually, a patched version doesn't segfault. However, my version does
not seem to honor custom the custom '=3D=3D' 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#=3D=3D =
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=20
prohibited and may be unlawful.  If you have received this communication =

in error, please immediately notify the sender by reply e-mail and =
destroy=20
all copies of the communication and any attachments.