We have method:
def sum(x, y, z)
x + y + z
end
and array
arr = [1,2,3]
How can one pass the array to sum method? Actually I need something like:
pseudo
sum(arr.each {|i| i})
without changing method, and it to work if sum would accept splat, so please do not offer sum(arr[0], arr[1], arr[2])