diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2015-09-04 23:29:01 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2015-09-04 23:29:01 +0000 |
commit | d433eec109b66252252ff6438cb23a867b7e1752 (patch) | |
tree | 1440470bf50d087b7a5fdb16fd647a07a26f2d7c | |
parent | 5ed20e6303f4cb8002e2526fa3fd7f8f31979018 (diff) | |
download | ruby-d433eec109b66252252ff6438cb23a867b7e1752.tar.gz |
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
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | hash.c | 7 |
2 files changed, 12 insertions, 0 deletions
@@ -1,3 +1,8 @@ +Sat Sep 5 08:28:58 2015 Nobuyoshi Nakada <nobu@ruby-lang.org> + + * hash.c (rb_hash_equal, rb_hash_eql): [DOC] the orders of each + hashes are not compared. [Bug #11508] + Fri Sep 4 23:26:22 2015 Nobuyoshi Nakada <nobu@ruby-lang.org> * include/ruby/win32.h: fix macro name for VC runtime version, @@ -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 <code>true</code> if <i>hash</i> and <i>other</i> are * both hashes with the same content. + * The orders of each hashes are not compared. */ static VALUE |