From 2d944dde7010997b519594670c9792b5f0f22736 Mon Sep 17 00:00:00 2001 From: Burdette Lamar Date: Fri, 30 Aug 2024 21:23:03 -0500 Subject: [PATCH] [DOC] Related for Array#[] (#11487) --- array.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/array.c b/array.c index 2d407e04d5..318449abb4 100644 --- a/array.c +++ b/array.c @@ -1878,6 +1878,7 @@ static VALUE rb_ary_aref2(VALUE ary, VALUE b, VALUE e); * # Raises TypeError (no implicit conversion of Symbol into Integer): * a[:foo] * + * Related: see {Methods for Fetching}[rdoc-ref:Array@Methods+for+Fetching]. */ VALUE @@ -8576,7 +8577,7 @@ rb_ary_deconstruct(VALUE ary) * * These methods do not modify +self+. * - * - #[]: Returns one or more elements. + * - #[], #slice: Returns consecutive elements as determined by a given argument. * - #fetch: Returns the element at a given offset. * - #first: Returns one or more leading elements. * - #last: Returns one or more trailing elements. @@ -8598,7 +8599,6 @@ rb_ary_deconstruct(VALUE ary) * - #take: Returns leading elements as determined by a given index. * - #drop_while: Returns trailing elements as determined by a given block. * - #take_while: Returns leading elements as determined by a given block. - * - #slice: Returns consecutive elements as determined by a given argument. * - #sort: Returns all elements in an order determined by <=> or a given block. * - #reverse: Returns all elements in reverse order. * - #compact: Returns an array containing all non-+nil+ elements.