2.x def foo(name, options = {}) end def bar(name, **options) end # Let's pass a hash parameter foo('Bruce Wayne', {age: 10}) # Ruby 2.6: works # Ruby 2.7: warns: Using the last argument as keyword parameters is deprecated; maybe ** should be added to th e call # Ruby 3.0: ArgumentError (wrong number of arguments (given 2, expected 1)) bar('Bruce Wayne', age: 10) # => works h = {age: 10} bar('Bruce Wayne', **h) # => works, ** is mandatory # The last hash argument still allowed to be passed without {}: foo('Bruce Wayne', age: 10) # => works