title: How to change Hash values?
body: <p>I'd like to replace each <code>value</code> in a hash with <code>value.some_method</code>.</p>
  
  <p>For example, for given a simple hash:</p>
  
  <pre><code>{"a" =&gt; "b", "c" =&gt; "d"}` 
  </code></pre>
  
  <p>every value should be <code>.upcase</code>d, so it looks like:</p>
  
  <pre><code>{"a" =&gt; "B", "c" =&gt; "D"}
  </code></pre>
  
  <p>I tried <code>#collect</code> and <code>#map</code> but always just get arrays back. Is there an elegant way to do this?</p>
  
  <p><strong>UPDATE</strong> </p>
  
  <p>Damn, I forgot: The hash is in an instance variable which should not be changed. I need a new hash with the changed values, but would prefer not to define that variable explicitly and then loop over the hash filling it. Something like:</p>
  
  <pre><code>new_hash = hash.magic{ ... }
  </code></pre>