Skip to content

Instantly share code, notes, and snippets.

@jcoglan
Created September 23, 2017 17:22
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save jcoglan/2770fbbf55caa293310ffc34a1d51a5c to your computer and use it in GitHub Desktop.
require 'set'
class Foo
def ==(x)
true
end
def eql?(x)
false
end
end
s = Set.new [Foo.new, Foo.new, Foo.new]
p s
# => #<Set: {#<Foo:0x00007ffc2885d5a0>, #<Foo:0x00007ffc2885d578>, #<Foo:0x00007ffc2885d550>}>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment