diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-02-26 07:38:13 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-02-26 07:38:13 +0000 |
commit | f2007660fa9a0e15287a742738cb0fe79772ed44 (patch) | |
tree | 757bd5aab36c4d0d6e750f9b29278756934674ee /array.c | |
parent | cb41935353f8ea5beafa22c6b1fa44998d150159 (diff) | |
download | ruby-f2007660fa9a0e15287a742738cb0fe79772ed44.tar.gz ruby-f2007660fa9a0e15287a742738cb0fe79772ed44.tar.xz ruby-f2007660fa9a0e15287a742738cb0fe79772ed44.zip |
* array.c (recursive_cmp): compare minimal length parts.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@15613 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'array.c')
-rw-r--r-- | array.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -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; |