title: Ruby: new hash from local variables
body: <p>I'm trying to create a Hash from local variables (tossing out vars that don't exist).  Something like this:</p>
  
  <pre><code>foo = "bar"
  baz = "qiz"
  
  ["foo", "baz", "nothing"].something_awesome
  
  #=&gt;
  {"foo" =&gt; "bar", "baz" =&gt; "qiz"}
  </code></pre>
  
  <p>I've tried a bunch of different combinations from Array and Enumerable, but can't find the right combo.  Any ideas?</p>
  
  <p>Thanks for your help!</p>