diff options
| author | Burdette Lamar <BurdetteLamar@Yahoo.com> | 2025-02-19 08:45:27 -0600 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-02-19 09:45:27 -0500 |
| commit | 188b3375b0668c71fa46eba8e0fc7628867c148e (patch) | |
| tree | a739296351be35870c14d187d0d08281c699905d | |
| parent | 3f07bc76ff6a11232d9f18e5eaa31835c195e8f0 (diff) | |
[DOC] Tweaks for Hash#eql?
Notes
Notes:
Merged: https://github.com/ruby/ruby/pull/12778
Merged-By: peterzhu2118 <peter@peterzhu.ca>
| -rw-r--r-- | hash.c | 9 |
1 files changed, 6 insertions, 3 deletions
@@ -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+, <tt>h[key].eql?(object[key])</tt>. + * + * - The given +object+ is a +Hash+ object. + * - +self+ and +object+ have the same keys (regardless of order). + * - For each key +key+, <tt>self[key].eql?(object[key])</tt>. * * 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 |
