summaryrefslogtreecommitdiff
path: root/array.c
diff options
context:
space:
mode:
authorNobuyoshi Nakada <nobu@ruby-lang.org>2023-06-01 13:33:59 +0900
committerNobuyoshi Nakada <nobu@ruby-lang.org>2023-06-01 21:44:53 +0900
commita5e1d549b508806b2fd14100683f504c7825a138 (patch)
treee22dae425bd64ea03cb668143bc62029cf2bb941 /array.c
parenta16cffe384ab167c22b4ae44c05950732cec2ae6 (diff)
[DOC] Mention the edge case of `any?`/`all?`
Notes
Notes: Merged: https://github.com/ruby/ruby/pull/7883
Diffstat (limited to 'array.c')
-rw-r--r--array.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/array.c b/array.c
index 72c796728d..a99fd9c73d 100644
--- a/array.c
+++ b/array.c
@@ -7768,6 +7768,9 @@ rb_ary_drop_while(VALUE ary)
*
* Returns +true+ if any element of +self+ meets a given criterion.
*
+ * If +self+ has no element, returns +false+ and argument or block
+ * are not used.
+ *
* With no block given and no argument, returns +true+ if +self+ has any truthy element,
* +false+ otherwise:
*
@@ -7829,6 +7832,9 @@ rb_ary_any_p(int argc, VALUE *argv, VALUE ary)
*
* Returns +true+ if all elements of +self+ meet a given criterion.
*
+ * If +self+ has no element, returns +true+ and argument or block
+ * are not used.
+ *
* With no block given and no argument, returns +true+ if +self+ contains only truthy elements,
* +false+ otherwise:
*