From 5381e4d1c0023f5176a2ffe700e5e4d006435d11 Mon Sep 17 00:00:00 2001 From: nobu Date: Fri, 4 Sep 2015 23:29:01 +0000 Subject: hash.c: [DOC] orders do not matter [ci skip] * hash.c (rb_hash_equal, rb_hash_eql): [DOC] the orders of each hashes are not compared. [Bug #11508] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51763 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- hash.c | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'hash.c') diff --git a/hash.c b/hash.c index aecc68f1af..bc689a557f 100644 --- a/hash.c +++ b/hash.c @@ -2139,6 +2139,12 @@ hash_equal(VALUE hash1, VALUE hash2, int eql) * h2 == h3 #=> true * h3 == h4 #=> false * + * The orders of each hashes are not compared. + * + * h1 = { "a" => 1, "c" => 2 } + * h2 = { "c" => 2, "a" => 1 } + * h1 == h2 #=> true + * */ static VALUE @@ -2153,6 +2159,7 @@ rb_hash_equal(VALUE hash1, VALUE hash2) * * Returns true if hash and other are * both hashes with the same content. + * The orders of each hashes are not compared. */ static VALUE -- cgit v1.2.3