Skip to content

Instantly share code, notes, and snippets.

@denisdefreyne
Created May 18, 2022 09:40
Show Gist options
  • Save denisdefreyne/c2bc3235f53e48417856c8e489065212 to your computer and use it in GitHub Desktop.
Save denisdefreyne/c2bc3235f53e48417856c8e489065212 to your computer and use it in GitHub Desktop.
require "set"
home = Path.new("home", "denis")
also_home = Path.new("home", "denis")
elsewhere = Path.new("usr", "bin")
paths = Set.new
paths << home
paths.include?(home) # => true
paths.include?(also_home) # => true
paths.include?(elsewhere) # => false
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment