You\'re probably familiar with the following Ruby shorthand (a is an array):
a
a.map(&:method)
For example, try the followin
Instead of patching core classes yourself, as in the accepted answer, it's shorter and cleaner to use the functionality of the Facets gem:
require 'facets' a = [1,3,5,7,9] a.map &:+.(2)