diff --git a/ChangeLog b/ChangeLog index 748fe0bc88..87f828e792 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +Sat Sep 5 08:28:58 2015 Nobuyoshi Nakada + + * 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 * include/ruby/win32.h: fix macro name for VC runtime version, 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