Scott Watermasysk Husband, Father, Bootstrapper, Developer, Keyboarder, Pained Sixers Fan.

Ruby 2.7  Enumerable#tally


I am looking forward to this. I often use code that looks like this:

h =

items.each {|item| h[item] += 1}

What makes this work is whatever you pass to Hash in the initializer is used as the default value.