I'm trying to get this foo function to output "first" and then "second" but instead it is outputting {:x=>"first", :y=>"second"} and "this is y".
How can I use the hash as named arguments?
def foo(x='hi', y='this is y')
puts x
puts y
end
hash = {x: 'first', y: 'second'}
foo(**hash)