title: ruby 2.0 named parameters from a hash
body: <p>If I have a method in ruby that takes named arguments...</p>
  <pre><code>def smoosh(first: nil, second: nil)
      first + second
  end
  </code></pre>
  <p>Whats the easiest way to pass a hash to that method if the keys match:</p>
  <pre><code>params = { first: 'peanut', second: 'butter' }
  
  smoosh(params)
  </code></pre>
  <p>The above produces an argument error.</p>
  <h2>Update:</h2>
  <p>It seems like this might be an issue with how Sinatra parameters work.</p>
  <p>When I do:</p>
  <pre><code>get 'a_sinatra_route' do
    hash = params.clone
    hash.symbolize_keys!
  
    smoosh(hash)
  end
  </code></pre>
  <p>It works fine. It does not work when just passing the params in by themselves. (even though you can access the individual params with the symbol key <code>params[:attr]</code>)</p>