github/rails — pull request #51 by dbussink (2014-03-27 12:48:49+00:00)
Title: Dup string before changing encoding because it might be frozen

Calling String#force_encoding! on a frozen string throws an exception.
By dupping the string we prevent this from happening.

/cc @charliesome @tmm1