mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
[Doc] Fix Array#count comparing strategy
This commit is contained in:
parent
989e22f394
commit
813c3333a9
Notes:
git
2021-03-29 03:18:19 +09:00
1 changed files with 2 additions and 2 deletions
4
array.c
4
array.c
|
@ -6093,7 +6093,7 @@ rb_ary_compact(VALUE ary)
|
|||
* [0, 1, 2].count # => 3
|
||||
* [].count # => 0
|
||||
*
|
||||
* With argument +obj+, returns the count of elements <tt>eql?</tt> to +obj+:
|
||||
* With argument +obj+, returns the count of elements <tt>==</tt> to +obj+:
|
||||
* [0, 1, 2, 0].count(0) # => 2
|
||||
* [0, 1, 2].count(3) # => 0
|
||||
*
|
||||
|
@ -6102,7 +6102,7 @@ rb_ary_compact(VALUE ary)
|
|||
* [0, 1, 2, 3].count {|element| element > 1} # => 2
|
||||
*
|
||||
* With argument +obj+ and a block given, issues a warning, ignores the block,
|
||||
* and returns the count of elements <tt>eql?</tt> to +obj+:
|
||||
* and returns the count of elements <tt>==</tt> to +obj+:
|
||||
*/
|
||||
|
||||
static VALUE
|
||||
|
|
Loading…
Add table
Reference in a new issue