aboutsummaryrefslogtreecommitdiffstats
path: root/enum.c
diff options
context:
space:
mode:
authorkazu <kazu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-01-25 14:28:42 +0000
committerkazu <kazu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-01-25 14:28:42 +0000
commitd7f0e13912b71cb957b7923bd53641c87a9e75f6 (patch)
tree6c0a297604419630fcd366d885a0a45f8f07839f /enum.c
parent38768a885bda51046877a297edc08e9a69a3db91 (diff)
downloadruby-d7f0e13912b71cb957b7923bd53641c87a9e75f6.tar.gz
[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 5a56dca5c1..310db3f1df 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
*
*/