I was going through a blog and found following code snippet:
require 'fiddle'
str = 'water'.freeze
str.frozen? # true
memory_address = str.object_id * 2
Fiddle::Pointer.new(memory_address)[1] &= ~8
str.frozen? # false
Can anyone explain, I couldn't understand how following line is actually unfreeze the string.
Fiddle::Pointer.new(memory_address)[1] &= ~8