From 73fdc38bc2fa536afd405d023b5d568488556db0 Mon Sep 17 00:00:00 2001 From: yugui Date: Sat, 20 Jun 2009 09:06:35 +0000 Subject: merges r23557 and r23563 from trunk into ruby_1_9_1. -- * thread.c (rb_exec_recursive_paired): new function for proper handling of recursive arrays. [EXPERIMENTAL] [ruby-core:23402] * array.c (rb_ary_equal, rb_ary_eql, rb_ary_cmp): use above. * hash.c (hash_equal): ditto. -- * test/ruby/test_hash.rb (TestHash::test_equal2): recursive hashes are handled properly now. ref: [ruby-core:23402] * test/ruby/test_m17n.rb (TestM17N#test_sprintf_p): test fixed git-svn-id: http://svn.ruby-lang.org/repos/ruby/branches/ruby_1_9_1@23759 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- array.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'array.c') diff --git a/array.c b/array.c index 6923b382c..14b2f7c0c 100644 --- a/array.c +++ b/array.c @@ -2656,7 +2656,7 @@ recursive_equal(VALUE ary1, VALUE ary2, int recur) { long i; - if (recur) return Qfalse; + if (recur) return Qtrue; /* Subtle! */ for (i=0; i RARRAY_LEN(ary2)) { len = RARRAY_LEN(ary2); @@ -2828,7 +2828,7 @@ rb_ary_cmp(VALUE ary1, VALUE ary2) ary2 = to_ary(ary2); if (ary1 == ary2) return INT2FIX(0); - v = rb_exec_recursive(recursive_cmp, ary1, ary2); + v = rb_exec_recursive_paired(recursive_cmp, ary1, ary2, ary2); if (v != Qundef) return v; len = RARRAY_LEN(ary1) - RARRAY_LEN(ary2); if (len == 0) return INT2FIX(0); -- cgit