Skip to main content
Journey Uncommon Logo
JourneyUncommon
mediumRubykeyword arguments and double splatSingle-choice MCQ

What happens when this hash with a string key is splatted into a method that has a required keyword?

def g(a:, **rest) [a, rest] end h = { "a" => 1, b: 2 } g(**h)