Ruby 2.7.0-preview1 has been released on 30 May 2019. This blog explains how to setup ruby-2.7.0 on your system using rbenv.
ruby-2.7 adds filter_map which combines filter and map in one iteration.
Let us suppose you have a collection of employee records. Assume you have to get the…
Enumerable#tally
ruby-2.7 has introduced ‘tally’ which returns a hash where the keys are elements and values are the count of occurrence