Project

General

Profile

Actions

Feature #17744

closed

Accumulate `Enumerable#tally` results

Added by nobu (Nobuyoshi Nakada) 7 months ago. Updated 7 months ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Target version:
-
[ruby-core:102992]

Description

A feature request at DevelopersMeeting20200317Japan:

  • ko1: want to accumulate Enumerable#tally results

    h = {}
    [:a,:b,:c].tally(h)
    [:a,:b,:d].tally(h)
    
    p h #=> {:a=>2, :b=>2, :c=>1, :d=>1}
    
  • matz: looks good. please create a proposal

Updated by marcandre (Marc-Andre Lafortune) 7 months ago

Is there an issue using merge?

I retract my question, this change sounds simple enough

Updated by matz (Yukihiro Matsumoto) 7 months ago

Go ahead.

Matz.

Actions #3

Updated by nobu (Nobuyoshi Nakada) 7 months ago

  • Status changed from Open to Closed

Applied in changeset git|9143d21b1bf2f16b1e847d569a588510726d8860.


Enumerable#tally with the resulting hash [Feature #17744]

Actions

Also available in: Atom PDF