Skip to content

Instantly share code, notes, and snippets.

@denisdefreyne
Created May 18, 2022 09:38
Show Gist options
  • Save denisdefreyne/4324ff8055cdfcf0064ae9e5b9f46702 to your computer and use it in GitHub Desktop.
Save denisdefreyne/4324ff8055cdfcf0064ae9e5b9f46702 to your computer and use it in GitHub Desktop.
class Path
# …
def ==(other)
other.respond_to?(:to_str) &&
to_str == other.to_str
end
def eql?(other)
self.class == other.class &&
@components == other.components
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment