From: BurdetteLamar Date: Wed, 2 Oct 2024 16:12:09 +0000 (-0500) Subject: [DOC] Tweaks for Array#length X-Git-Tag: v3_4_0_preview2~94 X-Git-Url: https://repo.or.cz/ruby.git/commitdiff_plain/9f47f0eb3cd8a67b1a5708cbd3d105b5388af485 [DOC] Tweaks for Array#length --- 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