зеркало из https://github.com/github/ruby.git
[DOC] Improve an example of Array#count comparison [ci skip]
This commit is contained in:
Родитель
875c85a8bd
Коммит
f46bbb2e99
2
array.c
2
array.c
|
@ -6094,7 +6094,7 @@ rb_ary_compact(VALUE ary)
|
|||
* [].count # => 0
|
||||
*
|
||||
* With argument +obj+, returns the count of elements <tt>==</tt> to +obj+:
|
||||
* [0, 1, 2, 0].count(0) # => 2
|
||||
* [0, 1, 2, 0.0].count(0) # => 2
|
||||
* [0, 1, 2].count(3) # => 0
|
||||
*
|
||||
* With no argument and a block given, calls the block with each element;
|
||||
|
|
Загрузка…
Ссылка в новой задаче