title: Overriding == Operator is not working and exits program
body: <p>I am trying to override the <code>==</code> operation as shown <a href="https://stackoverflow.com/questions/11186815/override-operator-in-ruby">here</a>. I created <code>==</code> as so:</p>
  
  <pre><code>class Point
    def ==(g)
      p'Never reaches here'
      if @x==g.grid
        true
      else
        false
      end
    end
  end
  </code></pre>
  
  <p>I am calling the method as so:</p>
  
  <pre><code>def home? (gridPoint,point)
    if point==gridPoint
      do something
    end
  </code></pre>
  
  <p>When I run an application, <code>"Never reaches here"</code> is never printed, and the application skips the rest of the code and exits.</p>
  
  <p>If I print <code>gridPoint</code> and <code>Point</code> right before the <code>==</code>, I can see they are both points. Why does the program seem to have never entered the <code>==</code> method?</p>
  
  <p>I tried <code>point.==(gridPoint)</code>. This does not work either, and also defies the purpose of trying to clean the code.</p>
  
  <p>Can anyone help me?</p>