summaryrefslogtreecommitdiff
path: root/enum.c
diff options
context:
space:
mode:
authorMarcus Stollsteimer <sto.mar@web.de>2019-12-22 22:36:14 +0100
committerMarcus Stollsteimer <sto.mar@web.de>2019-12-22 22:36:14 +0100
commitbb05cdcd78b3e3d54f0ad9afc01de383ed33dc1c (patch)
tree52031ed60023fcfa77e06974cd8bd93e663ea07c /enum.c
parent7c37f2cb1ad248a1db327f3522a8e3ffa5c5412f (diff)
[DOC] Improve documentation for Enumerable#tally
Diffstat (limited to 'enum.c')
-rw-r--r--enum.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/enum.c b/enum.c
index db5f4d3..cc77964 100644
--- a/enum.c
+++ b/enum.c
@@ -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