Project

General

Profile

Bug #5752 ยป array.c.patch

fix delete_if - funny_falcon (Yura Sokolov), 12/14/2011 07:03 PM

View differences:

array.c
static VALUE
rb_ary_reject_bang(VALUE ary)
{
VALUE rejected_ary, result;
int state = 0;
RETURN_ENUMERATOR(ary, 0, 0);
return ary_reject_bang(ary);
rejected_ary = rb_ary_dup(ary);
result = rb_protect(ary_reject_bang, rejected_ary, &state);
rb_ary_replace(ary, rejected_ary);
if (state) rb_jump_tag(state);
return RTEST(result) ? ary : Qnil;
}
/*
......
rb_ary_delete_if(VALUE ary)
{
RETURN_ENUMERATOR(ary, 0, 0);
ary_reject_bang(ary);
rb_ary_reject_bang(ary);
return ary;
}
    (1-1/1)