1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

[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
This commit is contained in:
kazu 2017-01-25 14:28:42 +00:00
parent 7db9fbdfe6
commit a7bc6c1b8f

2
enum.c
View file

@ -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 >= 3 } #=> true
* %w[ant bear cat].all? { |word| word.length >= 4 } #=> false * %w[ant bear cat].all? { |word| word.length >= 4 } #=> false
* [nil, true, 99].all? #=> 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 >= 3 } #=> true
* %w[ant bear cat].any? { |word| word.length >= 4 } #=> true * %w[ant bear cat].any? { |word| word.length >= 4 } #=> true
* [nil, true, 99].any? #=> true * [nil, true, 99].any? #=> true
* [].any? #=> false
* *
*/ */