Project

General

Profile

Feature #6177 » patch.diff

Glass_saga (Masaki Matsushita), 03/20/2012 12:08 PM

View differences:

array.c
recursive_equal(VALUE ary1, VALUE ary2, int recur)
{
long i;
VALUE *p1, *p2;
if (recur) return Qtrue; /* Subtle! */
for (i=0; i<RARRAY_LEN(ary1); i++) {
p1 = RARRAY_PTR(ary1);
p2 = RARRAY_PTR(ary2);
for (i = 0; i<RARRAY_LEN(ary1) && *p1 == *p2; i++) {
p1++;
p2++;
}
for (; i<RARRAY_LEN(ary1); i++) {
if (!rb_equal(rb_ary_elt(ary1, i), rb_ary_elt(ary2, i)))
return Qfalse;
}
(1-1/4)