ruby-changes:49113
From: stomar <ko1@a...>
Date: Thu, 14 Dec 2017 19:22:01 +0900 (JST)
Subject: [ruby-changes:49113] stomar:r61229 (trunk): enum.c: improve docs for Enumerable#{any?, all?, none?, one?}
stomar 2017-12-14 19:21:56 +0900 (Thu, 14 Dec 2017) New Revision: 61229 https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=61229 Log: 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. Modified files: trunk/enum.c Index: enum.c =================================================================== --- enum.c (revision 61228) +++ enum.c (revision 61229) @@ -1201,7 +1201,7 @@ DEFINE_ENUMFUNCS(all) https://github.com/ruby/ruby/blob/trunk/enum.c#L1201 * +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) https://github.com/ruby/ruby/blob/trunk/enum.c#L1242 * 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 https://github.com/ruby/ruby/blob/trunk/enum.c#L1506 * 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) https://github.com/ruby/ruby/blob/trunk/enum.c#L1550 * <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 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/