Skip to content

Commit

Permalink
[DOC] Improve documentation for Enumerable#tally
Browse files Browse the repository at this point in the history
  • Loading branch information
stomar committed Dec 22, 2019
1 parent 7c37f2c commit bb05cdc
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions enum.c
Expand Up @@ -1002,11 +1002,11 @@ tally_i(RB_BLOCK_CALL_FUNC_ARGLIST(i, hash))
* call-seq:
* enum.tally -> a_hash
*
* Tallys the collection. Returns a hash where the keys are the
* elements and the values are numbers of elements in the collection
* that correspond to the key.
* Tallies the collection, i.e., counts the occurrences of each element.
* Returns a hash with the elements of the collection as keys and the
* 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
Expand Down

0 comments on commit bb05cdc

Please sign in to comment.