Skip to content

Instantly share code, notes, and snippets.

@jacegu
Created January 14, 2012 15:35
Show Gist options
  • Save jacegu/1611803 to your computer and use it in GitHub Desktop.
Save jacegu/1611803 to your computer and use it in GitHub Desktop.
class Key
attr_reader :value
def initialize(value)
@value = value
end
end
k1 = Key.new('foo')
k2 = Key.new('foo')
h = { k1 => 'bar' }
puts h.has_key? k1 # -> true
puts h.has_key? k2 # -> false ??
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment