Closed jessedoyle closed 8 years ago
It was common to see the following code:
arr = [] items.each do |i| arr << i # something more elaborate here... end arr
This PR simplifies the codebase by using tap:
tap
[].tap do |arr| items.each do |i| arr << i end end
It was common to see the following code:
This PR simplifies the codebase by using
tap
: