Bug #7437 ยป ruby-7437.patch
array.c (working copy) | ||
---|---|---|
VALUE
|
||
rb_ary_delete(VALUE ary, VALUE item)
|
||
{
|
||
VALUE v = item;
|
||
long i1, i2;
|
||
for (i1 = i2 = 0; i1 < RARRAY_LEN(ary); i1++) {
|
||
VALUE e = RARRAY_PTR(ary)[i1];
|
||
if (rb_equal(e, item)) {
|
||
v = e;
|
||
continue;
|
||
}
|
||
if (i1 != i2) {
|
||
... | ... | |
ary_resize_smaller(ary, i2);
|
||
return v;
|
||
return item;
|
||
}
|
||
void
|