From 03ca99c93beece993c607a01dc99425d70eba619 Mon Sep 17 00:00:00 2001 From: Burdette Lamar Date: Sun, 29 Sep 2024 20:22:43 -0500 Subject: [PATCH] [DOC] Tweaks for Array#hash (#11704) --- array.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/array.c b/array.c index c096782bd6..5f707b0a5f 100644 --- a/array.c +++ b/array.c @@ -5275,14 +5275,16 @@ rb_ary_hash_values(long len, const VALUE *elements) /* * call-seq: - * array.hash -> integer + * hash -> integer * * Returns the integer hash value for +self+. * - * Two arrays with the same content will have the same hash code (and will compare using #eql?): + * Two arrays with the same content will have the same hash value + * (and will compare using eql?): * - * [0, 1, 2].hash == [0, 1, 2].hash # => true - * [0, 1, 2].hash == [0, 1, 3].hash # => false + * ['a', 'b'].hash == ['a', 'b'].hash # => true + * ['a', 'b'].hash == ['a', 'c'].hash # => false + * ['a', 'b'].hash == ['a'].hash # => false * */