I'm trying to update a multidimensinal hash and then compare the new hash with the old one, but no matter what value I change they still show up as equal. Is there an efficient way to compare every value in two hashes and return false if one isn't true
hash1 = {foo: {bar: "baz"}}
hash2 = hash1
hash2[:foo][:bar] = "foz"
hash2 == hash1 # This should be false but is returning true