diff --git a/lib/ulid.rb b/lib/ulid.rb index 0fa60772..60ad42b8 100644 --- a/lib/ulid.rb +++ b/lib/ulid.rb @@ -353,13 +353,9 @@ def eql?(other) def ===(other) case other when ULID - self == other + to_i == other.to_i when String - begin - self == self.class.parse(other) - rescue Exception - false - end + to_s == other.upcase else false end