Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add new "Equal Object Identifier" rule
This PR adds new "Equal Object Identifier" rule that prefers `equal?` over `==` when comparing `object_id`. `Object#equal?` method is provided to compare objects for identity, and comparing objects for equality using `Object#==` does not require redundant `object_id` to be repeated. ```ruby # bad foo.object_id == bar.object_id # good foo.equal?(bar) ```
- Loading branch information