As Alex has said the best way would be to just define your own method #sum for Enumerable,
however while each Enumerable is supposed to have #each, what it yields is different for each subclass. For example Hash yields a key-value pair, which your single #sum method would have to know how to deal with.
Here's one example of how it might do it, it tries to splat the incoming arguments into an array and the sum includes only the last element of the array. This works for Hashes, Array and Ranges (however it probably only works in 1.9)
module Enumerable
def sum
r = 0
each {|(*x)| r += x.last}
r
end
end
Alternatively you could define your own iterating method for each Enumerable, like #each_for_sum and let #sum use that method to do the summing. But you'd probably have to write several versions of #each_for_sum for different Enumerables (for example, the default #each_for_sum would be just Enumerable#each, but Hash#each_for_sum would yield just values).
module Enumerable
def sum
r = 0
each_for_sum {|x| r += x}
r
end
def each_for_sum &block
each(&block)
end
end
class Hash
def each_for_sum
values.each {|x| yield x}
end
end