Ruby

Ruby

Made by DeepSource

Detected == for comparison instead of recommended equal? method RB-LI1100

Bug risk
Major

Prefer Object#equal? method for comparison instead of == as the latter is provided for performing value comparisons, whereas equal? is provided to compare objects for identity.

Bad practice

# bad
one_object.object_id == another_object.object_id

Recommended

# good
one_object.equal?(another_object)