title: How to return a string when there is an non-existent element in a hash using an array
body: <p>I have this hash and this array, and execute the following command...</p>
  
  <pre><code>hash={"a"=&gt;1,"b"=&gt;2,"c"=&gt;3,"d"=&gt;4,"e"=&gt;5,"f"=&gt;6}
  array=["b","a","c","f","z","q"]
  print hash.values_at(*array).compact
  </code></pre>
  
  <p>So I want it to return something like:</p>
  
  <pre><code>#=&gt; [2,1,3,6,"invalid","invalid"]
  </code></pre>
  
  <p>Is there a way to declare all other elements non-existent in the hash as "invalid", without declaring one by one (e.g. "g"=>"invalid", "h"=>"invalid"...)?</p>