Keyword Argument def foo(a, b: 42, **keys) p [a,b,keys] end foo(1) # => [1,42,{}] foo(2, b: 5) # => [2,5,{}] foo(3, b: 4, c: 6) # => [3,4,{:c=>6}]