[DOC] Related for Array#count
This commit is contained in:
parent
ff43e618e9
commit
a055a426ed
Notes:
git
2024-09-10 19:37:36 +00:00
4
array.c
4
array.c
@ -6386,10 +6386,12 @@ rb_ary_compact(VALUE ary)
|
|||||||
* With no argument and a block given, calls the block with each element;
|
* With no argument and a block given, calls the block with each element;
|
||||||
* returns the count of elements for which the block returns a truthy value:
|
* returns the count of elements for which the block returns a truthy value:
|
||||||
*
|
*
|
||||||
* [0, 1, 2, 3].count {|element| element > 1} # => 2
|
* [0, 1, 2, 3].count {|element| element > 1 } # => 2
|
||||||
*
|
*
|
||||||
* With argument +object+ and a block given, issues a warning, ignores the block,
|
* With argument +object+ and a block given, issues a warning, ignores the block,
|
||||||
* and returns the count of elements <tt>==</tt> to +object+.
|
* and returns the count of elements <tt>==</tt> to +object+.
|
||||||
|
*
|
||||||
|
* Related: see {Methods for Querying}[rdoc-ref:Array@Methods+for+Querying].
|
||||||
*/
|
*/
|
||||||
|
|
||||||
static VALUE
|
static VALUE
|
||||||
|
Loading…
x
Reference in New Issue
Block a user