From 188b3375b0668c71fa46eba8e0fc7628867c148e Mon Sep 17 00:00:00 2001 From: Burdette Lamar Date: Wed, 19 Feb 2025 08:45:27 -0600 Subject: [DOC] Tweaks for Hash#eql? --- hash.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/hash.c b/hash.c index 7f0c2be91f..dd958810a3 100644 --- a/hash.c +++ b/hash.c @@ -3846,9 +3846,10 @@ rb_hash_equal(VALUE hash1, VALUE hash2) * eql?(object) -> true or false * * Returns +true+ if all of the following are true: - * * +object+ is a +Hash+ object. - * * +hash+ and +object+ have the same keys (regardless of order). - * * For each key +key+, h[key].eql?(object[key]). + * + * - The given +object+ is a +Hash+ object. + * - +self+ and +object+ have the same keys (regardless of order). + * - For each key +key+, self[key].eql?(object[key]). * * Otherwise, returns +false+. * @@ -3857,6 +3858,8 @@ rb_hash_equal(VALUE hash1, VALUE hash2) * h1.eql? h2 # => true * h3 = {baz: 2, bar: 1, foo: 0} * h1.eql? h3 # => true + * + * Related: see {Methods for Querying}[rdoc-ref:Hash@Methods+for+Querying]. */ static VALUE -- cgit v1.2.3