Project

General

Profile

Bug #7437 ยป ruby-7437.patch

hasari (Hiro Asari), 11/26/2012 01:21 PM

View differences:

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
    (1-1/1)