enum.c: improve docs for Enumerable#{any?,all?,none?,one?}

* enum.c: [DOC] reword docs for Enumerable#{any?,all?,none?,one?}
  to not mention the receiver (`enum') from call-seq, because it
  does not appear in the call-seq of the rendered HTML docs.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61229 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
stomar 2017-12-14 10:21:56 +00:00
Родитель bbec11d329
Коммит b5e0b65e57
1 изменённых файлов: 4 добавлений и 4 удалений

8
enum.c
Просмотреть файл

@ -1201,7 +1201,7 @@ DEFINE_ENUMFUNCS(all)
* +false+ or +nil+.
*
* If instead a pattern is supplied, the method returns whether
* <code>pattern === element</code> for every element of <i>enum</i>.
* <code>pattern === element</code> for every collection member.
*
* %w[ant bear cat].all? { |word| word.length >= 3 } #=> true
* %w[ant bear cat].all? { |word| word.length >= 4 } #=> false
@ -1242,7 +1242,7 @@ DEFINE_ENUMFUNCS(any)
* members is not +false+ or +nil+.
*
* If instead a pattern is supplied, the method returns whether
* <code>pattern === element</code> for any element of <i>enum</i>.
* <code>pattern === element</code> for any collection member.
*
* %w[ant bear cat].any? { |word| word.length >= 3 } #=> true
* %w[ant bear cat].any? { |word| word.length >= 4 } #=> true
@ -1506,7 +1506,7 @@ rb_nmin_run(VALUE obj, VALUE num, int by, int rev, int ary)
* true.
*
* If instead a pattern is supplied, the method returns whether
* <code>pattern === element</code> for exactly one element of <i>enum</i>.
* <code>pattern === element</code> for exactly one collection member.
*
* %w{ant bear cat}.one? { |word| word.length == 4 } #=> true
* %w{ant bear cat}.one? { |word| word.length > 4 } #=> false
@ -1550,7 +1550,7 @@ DEFINE_ENUMFUNCS(none)
* <code>true</code> only if none of the collection members is true.
*
* If instead a pattern is supplied, the method returns whether
* <code>pattern === element</code> for none of the elements of <i>enum</i>.
* <code>pattern === element</code> for none of the collection members.
*
* %w{ant bear cat}.none? { |word| word.length == 5 } #=> true
* %w{ant bear cat}.none? { |word| word.length >= 4 } #=> false