title: Difference between update(other_hash) and merge(other_hash)
body: <p><em><strong>Update Code:</em></strong></p>
  
  <pre><code>irb(main):001:0&gt; h1 = { "a" =&gt; 100, "b" =&gt; 200 }
  =&gt; {"a"=&gt;100, "b"=&gt;200}
  irb(main):002:0&gt; h2 = { "b" =&gt; 254, "c" =&gt; 300 }
  =&gt; {"b"=&gt;254, "c"=&gt;300}
  irb(main):003:0&gt; h1.update(h2)
  =&gt; {"a"=&gt;100, "b"=&gt;254, "c"=&gt;300}
  </code></pre>
  
  <p><strong>Merge Code:</strong></p>
  
  <pre><code>irb(main):001:0&gt; h1 = { "a" =&gt; 100, "b" =&gt; 200 }
  =&gt; {"a"=&gt;100, "b"=&gt;200}
  irb(main):002:0&gt; h2 = { "b" =&gt; 254, "c" =&gt; 300 }
  =&gt; {"b"=&gt;254, "c"=&gt;300}
  irb(main):003:0&gt; h1.merge(h2)
  =&gt; {"a"=&gt;100, "b"=&gt;254, "c"=&gt;300}
  irb(main):004:0&gt;
  </code></pre>
  
  <p>I ran the above <code>merge</code> and <code>update</code> method on the same <code>hash</code>. But got the same output. So here my question is: are <code>update</code> and <code>merge</code> works with same logic? if not same then how the output came same for those?</p>