diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2009-05-24 13:48:23 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2009-05-24 13:48:23 +0000 |
commit | 02fb261ec11afc34e0329aa3bbbe146cd1c89e84 (patch) | |
tree | 4564444a30a9dc991c8401733228fa37c8a0918f /hash.c | |
parent | b55ff9989153cbe786967d8a1382846059fd2c54 (diff) | |
download | ruby-02fb261ec11afc34e0329aa3bbbe146cd1c89e84.tar.gz |
* 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.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23557 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'hash.c')
-rw-r--r-- | hash.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -1451,7 +1451,7 @@ recursive_eql(VALUE hash, VALUE dt, int recur) { struct equal_data *data; - if (recur) return Qfalse; + if (recur) return Qtrue; /* Subtle! */ data = (struct equal_data*)dt; data->result = Qtrue; rb_hash_foreach(hash, eql_i, dt); @@ -1488,7 +1488,7 @@ hash_equal(VALUE hash1, VALUE hash2, int eql) data.tbl = RHASH(hash2)->ntbl; data.eql = eql; - return rb_exec_recursive(recursive_eql, hash1, (VALUE)&data); + return rb_exec_recursive_paired(recursive_eql, hash1, hash2, (VALUE)&data); } /* |