class A def hash 12 end def ==(other) true endendx = {}a = A.newb = A.newx[a] = "Hello"x[b] = "World"puts x
This is printing:{#<A:0x000055d1f3985c68>=>"Hello", #<A:0x000055d1f3985830>=>"World"}
I expected replacement, not happening, why?
class A def hash 12 end def ==(other) true endendx = {}a = A.newb = A.newx[a] = "Hello"x[b] = "World"puts x
This is printing:{#<A:0x000055d1f3985c68>=>"Hello", #<A:0x000055d1f3985830>=>"World"}
I expected replacement, not happening, why?