def foo (x, y=10, z=nil) z = x * y if z.nil? # etc end