[DOC] Improve documentation for Enumerable#tally
This commit is contained in:
parent
7c37f2cb1a
commit
bb05cdcd78
8
enum.c
8
enum.c
@ -1002,11 +1002,11 @@ tally_i(RB_BLOCK_CALL_FUNC_ARGLIST(i, hash))
|
|||||||
* call-seq:
|
* call-seq:
|
||||||
* enum.tally -> a_hash
|
* enum.tally -> a_hash
|
||||||
*
|
*
|
||||||
* Tallys the collection. Returns a hash where the keys are the
|
* Tallies the collection, i.e., counts the occurrences of each element.
|
||||||
* elements and the values are numbers of elements in the collection
|
* Returns a hash with the elements of the collection as keys and the
|
||||||
* that correspond to the key.
|
* corresponding counts as values.
|
||||||
*
|
*
|
||||||
* ["a", "b", "c", "b"].tally #=> {"a"=>1, "b"=>2, "c"=>1}
|
* ["a", "b", "c", "b"].tally #=> {"a"=>1, "b"=>2, "c"=>1}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
static VALUE
|
static VALUE
|
||||||
|
Loading…
x
Reference in New Issue
Block a user