hash = { 1 => 1, 2 => 4, 3 => 9 }hash.freezearr = hash.to_aputs hash.frozen? # trueputs arr.frozen? # falsehash2 = hashputs hash2.frozen? # true