lib/slim_lint/atom.rb in slim_lint-0.6.1 vs lib/slim_lint/atom.rb in slim_lint-0.7.0

- old
+ new

@@ -18,15 +18,10 @@ # else. # # @param other [Object] # @return [Boolean] def ==(other) - case other - when Atom - @value == other.instance_variable_get(:@value) - else - @value == other - end + @value == (other.is_a?(Atom) ? other.instance_variable_get(:@value) : other) end # Returns whether this atom matches the given Sexp pattern. # # This exists solely to make an {Atom} quack like a {Sexp}, so we don't have