elements.each(*p)

ruby / patterns

I often use

ary.map(&:upcase)

instead of

ary.map { |a| a.upcase }

But what can I do to use the elements as param as in the following code?

ary.each { |a| p a }

Next 97% is as good as a 100%

Share


Previous

Comments?