Do you need to overwrite hash and eql? when overwriting == operator in Ruby?
<p>In languages like Java and C#, if you are override equality operators, you must override the hash method as well.</p>

<blockquote>
  <p>Whenever a.equals(b), then a.hashCode() must be same as b.hashCode()</p>
</blockquote>

<p>As far I understand, some internal data structures in these languages rely on the condition above to hold true in order to function correctly.</p>

<p>I wonder if the same is true in Ruby. Do you need to override <code>hash</code> method of the object when overriding <code>==</code> operator? I heard that you need to override the <code>eql?</code> when overriding <code>==</code>. What are the reasons behind those claims, and what would happen if you won't override those?</p>