diff options
-rw-r--r-- | ChangeLog | 4 | ||||
-rw-r--r-- | array.c | 2 |
2 files changed, 5 insertions, 1 deletions
@@ -1,3 +1,7 @@ +Tue Feb 26 16:38:10 2008 Nobuyoshi Nakada <nobu@ruby-lang.org> + + * array.c (recursive_cmp): compare minimal length parts. + Tue Feb 26 16:06:00 2008 Technorama Ltd. <oss-ruby@technorama.net> * ext/openssl/ossl_{ec,dh,dsa,rsa}.c: Remove useless warnings. @@ -2442,7 +2442,7 @@ recursive_cmp(VALUE ary1, VALUE ary2, int recur) if (len > RARRAY_LEN(ary2)) { len = RARRAY_LEN(ary2); } - for (i=0; i<RARRAY_LEN(ary1); i++) { + for (i=0; i<len; i++) { VALUE v = rb_funcall(rb_ary_elt(ary1, i), id_cmp, 1, rb_ary_elt(ary2, i)); if (v != INT2FIX(0)) { return v; |