From 9f47f0eb3cd8a67b1a5708cbd3d105b5388af485 Mon Sep 17 00:00:00 2001 From: BurdetteLamar Date: Wed, 2 Oct 2024 11:12:09 -0500 Subject: [PATCH] [DOC] Tweaks for Array#length --- array.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/array.c b/array.c index 103658f783..fca9976c57 100644 --- a/array.c +++ b/array.c @@ -2725,9 +2725,15 @@ rb_ary_reverse_each(VALUE ary) /* * call-seq: - * array.length -> an_integer + * length -> integer + * size -> integer * - * Returns the count of elements in +self+. + * Returns the count of elements in +self+: + * + * [0, 1, 2].length # => 3 + * [].length # => 0 + * + * Related: see {Methods for Querying}[rdoc-ref:Array@Methods+for+Querying]. */ static VALUE