Sequence Mediaworks

Sequence Mediaworks

Search
Skip to content
  • Products
  • Blog
advice, computers, debugging, Development, programming

Ruby Strings throw “can’t modify frozen string” type error

November 10, 2011 amy

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 cloneing. As noted on StackOverflow cloning also copies the frozen state.

  • Tweet

Post navigation

Previous Post“dunder” = “double underscore” => ‘__’Next PostConfigure Rails 3’s I18N load path for subdirectories
sBASSdrum
- Features
- Videos
- Images
- Help & Tutorials

- Press Release (English)
- Press Release (Klingon)
- Press Kit

Download sounds

Main Blog
Development Blog
Proudly powered by WordPress