In Ruby,

def calc(a, b)
  a += 1
  b += 2
  [a, b]
end

x = 10
y = 10
foo, bar = calc(x, y)

p "#{x}, #{y}, #{foo}, #{bar}"