summaryrefslogtreecommitdiff
path: root/enum.c
diff options
context:
space:
mode:
authorkazu <kazu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-01-25 14:28:42 (GMT)
committerkazu <kazu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-01-25 14:28:42 (GMT)
commita7bc6c1b8fb2cd2826f541fb159994752158fbee (patch)
tree6c0a297604419630fcd366d885a0a45f8f07839f /enum.c
parent7db9fbdfe69fb0f01882084116d3cbf152df4fa8 (diff)
[DOC] Add empty example to enum.all? and any?
[ci skip] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57421 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'enum.c')
-rw-r--r--enum.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/enum.c b/enum.c
index 5a56dca..310db3f 100644
--- a/enum.c
+++ b/enum.c
@@ -1166,6 +1166,7 @@ DEFINE_ENUMFUNCS(all)
* %w[ant bear cat].all? { |word| word.length >= 3 } #=> true
* %w[ant bear cat].all? { |word| word.length >= 4 } #=> false
* [nil, true, 99].all? #=> false
+ * [].all? #=> true
*
*/
@@ -1200,6 +1201,7 @@ DEFINE_ENUMFUNCS(any)
* %w[ant bear cat].any? { |word| word.length >= 3 } #=> true
* %w[ant bear cat].any? { |word| word.length >= 4 } #=> true
* [nil, true, 99].any? #=> true
+ * [].any? #=> false
*
*/