The following code creates a hashmap and places it inside of itself.
hash = {}
hash[hash] = hash
hash.keys.first == hash # true
hash.values.first == hash # true
hash[hash] # nil??
hash.key?(hash) # False
hash[hash.keys.first] # nil???
hash[{}] # nil
Can anyone explain these results to me? They seem very counterintuitive.