зеркало из https://github.com/github/ruby.git
* array.c (recursive_cmp): compare minimal length parts.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15613 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
Родитель
161b45f59c
Коммит
525b2e78e5
|
@ -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>
|
Tue Feb 26 16:06:00 2008 Technorama Ltd. <oss-ruby@technorama.net>
|
||||||
|
|
||||||
* ext/openssl/ossl_{ec,dh,dsa,rsa}.c: Remove useless warnings.
|
* ext/openssl/ossl_{ec,dh,dsa,rsa}.c: Remove useless warnings.
|
||||||
|
|
2
array.c
2
array.c
|
@ -2442,7 +2442,7 @@ recursive_cmp(VALUE ary1, VALUE ary2, int recur)
|
||||||
if (len > RARRAY_LEN(ary2)) {
|
if (len > RARRAY_LEN(ary2)) {
|
||||||
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));
|
VALUE v = rb_funcall(rb_ary_elt(ary1, i), id_cmp, 1, rb_ary_elt(ary2, i));
|
||||||
if (v != INT2FIX(0)) {
|
if (v != INT2FIX(0)) {
|
||||||
return v;
|
return v;
|
||||||
|
|
Загрузка…
Ссылка в новой задаче