repo.or.cz
/
ruby.git
/
commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
raw
|
patch
|
inline
|
side by side
(parent:
99620b9
)
[DOC] Tweaks for Array#length
author
BurdetteLamar
<
[email protected]
>
Wed, 2 Oct 2024 16:12:09 +0000
(2 11:12 -0500)
committer
Peter Zhu
<
[email protected]
>
Wed, 2 Oct 2024 17:19:27 +0000
(2 13:19 -0400)
array.c
patch
|
blob
|
blame
|
history
diff --git
a/array.c
b/array.c
index
103658f
..
fca9976
100644
(file)
--- 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