Duped into modifying a frozen hash - Kevin Murphy
24-Feb-2023 842
The immutability isn’t “deep”. It’s shallow. It doesn’t nest down to lower levels. Adding deep freezing to Ruby itself has been discussed. There are also gems that you can use to recursively freeze objects.The affect of freeze only being shallow isn’t specific to a hash. It applies to other data structures and objects as well. However, I specifically want to talk about hashes because….
Duped into modifying a frozen hash - Kevin Murphy #ruby #rubydeveloper #rubyonrails #Duped #modifying #frozen #Kevin #Murphy https://rubyonrails.ba/link/duped-into-modifying-a-frozen-hash-kevin-murphy