diff options
author | Burdette Lamar <[email protected]> | 2024-08-16 15:11:55 -0500 |
---|---|---|
committer | GitHub <[email protected]> | 2024-08-16 16:11:55 -0400 |
commit | 77ac853c15ef64bfc663e4b91a0707b549b940eb (patch) | |
tree | 73b938caa7d9134afd134d58f23cbb4e248fa8d1 | |
parent | 1917c8c8f333c2c39b575f47a17e74f4024f6051 (diff) |
[DOC] Tweaks to Array#assoc (#11384)
Notes
Notes:
Merged-By: peterzhu2118 <[email protected]>
-rw-r--r-- | array.c | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -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 <tt>==</tt> +obj+: + * Returns the first element +ele+ in +self+ such that +ele+ is an array + * and <tt>ele[0] == object</tt>: * * 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 |