def foo(id:0, name:"", age:0) p [id, name, age] end foo(age:22, name:"Tom") #=> [0, "Tom", 22]