From 3719b3d74d7091aafd486b8cd0e8985208b4d8c0 Mon Sep 17 00:00:00 2001 From: Burdette Lamar Date: Wed, 7 Aug 2024 14:59:57 -0500 Subject: [PATCH] [DOC] Tweaks to Array#- (#11303) --- array.c | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/array.c b/array.c index 605817d0a4..16a1d65772 100644 --- a/array.c +++ b/array.c @@ -5408,16 +5408,18 @@ ary_make_hash_by(VALUE ary) /* * call-seq: - * array - other_array -> new_array + * self - other_array -> new_array * - * Returns a new +Array+ containing only those elements from +array+ - * that are not found in +Array+ +other_array+; - * items are compared using eql?; - * the order from +array+ is preserved: + * Returns a new array containing only those elements of +self+ + * that are not found in +other_array+; + * the order from +self+ is preserved: * - * [0, 1, 1, 2, 1, 1, 3, 1, 1] - [1] # => [0, 2, 3] - * [0, 1, 2, 3] - [3, 0] # => [1, 2] - * [0, 1, 2] - [4] # => [0, 1, 2] + * [0, 1, 1, 2, 1, 1, 3, 1, 1] - [1] # => [0, 2, 3] + * [0, 1, 1, 2, 1, 1, 3, 1, 1] - [3, 2, 0, :foo] # => [1, 1, 1, 1, 1, 1] + * [0, 1, 2] - [:foo] # => [0, 1, 2] + * + * Element are compared using method #eql? + * (as defined in each element of +self+). * * Related: Array#difference. */