title: How to map hash items to method parameters?
body: <p>I have a method with a lengthy list of optional arguments, such as:</p>
  
  <pre><code>def foo(foo = nil, bar = nil, baz = nil, qux = nil)
      # no-op
  end
  </code></pre>
  
  <p>I thought that calling the method and passing a split hash as a parameter would map the hash items to parameters by matching the key with the method parameter:</p>
  
  <pre><code>params = { bar: 'bar', foo: 'foo' }
  foo(*params)
  </code></pre>
  
  <p>Unfortunately, when I examine the local variables after calling the method with a split hash, I get exactly what I'd expect if I passed in a split array, but it's not what I was hoping for:</p>
  
  <pre><code>foo == [:bar, 'bar'] # hoped: foo == 'foo'
  bar == [:foo, 'foo'] # hoped: bar == 'bar'
  </code></pre>
  
  <p>What am I lacking here?</p>