Orequals is a shortcut for writing the following. Returns 0 if obj and other are the same object or obj other otherwise nil. Object ruby 2 7 0.