title: Can I do the union operator for two hashes and keep the max value
body: <p>I wonder is there efficient way to get my goal in Ruby.</p>
  
  <p>Keep all the keys in the two hashed, and keep the larger value.</p>
  
  <h1>input</h1>
  
  <pre><code>h1 = {
   a: 0,
   b: 1,
   c: 2
  }
  
  h2 = {
    a: 7,
    c: 9
  }
  </code></pre>
  
  <h1>output</h1>
  
  <pre><code>{
    a: 7,
    b: 1,
    c: 9  
  }
  </code></pre>