I ran into this today:
can't modify frozen string
Turns out you can:
string.freeze
And you can test with:
string.frozen?
But let’s say you want to modify it. Try duping it instead of
clone
ing. As noted on StackOverflow cloning also copies the frozen state.