Equality check in Ruby