From 77ac853c15ef64bfc663e4b91a0707b549b940eb Mon Sep 17 00:00:00 2001 From: Burdette Lamar Date: Fri, 16 Aug 2024 15:11:55 -0500 Subject: [PATCH] [DOC] Tweaks to Array#assoc (#11384) --- array.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/array.c b/array.c index 215ea639b4..10e3a11a86 100644 --- a/array.c +++ b/array.c @@ -5073,17 +5073,17 @@ rb_ary_times(VALUE ary, VALUE times) /* * call-seq: - * array.assoc(obj) -> found_array or nil + * assoc(object) -> found_array or nil * - * Returns the first element in +self+ that is an +Array+ - * whose first element == +obj+: + * Returns the first element +ele+ in +self+ such that +ele+ is an array + * and ele[0] == object: * * a = [{foo: 0}, [2, 4], [4, 5, 6], [4, 5]] * a.assoc(4) # => [4, 5, 6] * * Returns +nil+ if no such element is found. * - * Related: #rassoc. + * Related: Array#rassoc. */ VALUE