def foo(a,b, c = a + b, d = c + 1)
  puts a,b,c,d
end

foo(1,2) 