passing underscore to block parameters
It is a coding style to pass underscore for unused block parameters
# bad; result = hash.map { |k, v| v + 1 } # good; result = hash.map { |_, v| v + 1 }
https://github.com/styleguide/ruby
Advertisements
Leave a Comment