Defect #17235
closeduse test_email report can't modify frozen String
0%
Description
version:
Environment:
Redmine version 2.5.1.stable
Ruby version 1.9.3-p545 (2014-02-24) [x86_64-linux]
Rails version 3.2.17
Environment production
Database adapter Mysql2
SCM:
Subversion 1.8.8
Git 1.9.0
Filesystem
Redmine plugins:
no plugin installed
call to : http://host/redmine/admin/test_email
exception:
RuntimeError (can't modify frozen String):
lib/redmine/codeset_util.rb:11:in `force_encoding'
lib/redmine/codeset_util.rb:11:in `replace_invalid_utf8'
app/controllers/admin_controller.rb:68:in `rescue in test_email'
app/controllers/admin_controller.rb:64:in `test_email'
fix:
I added str = str.dup @ line 11 in lib/redmine/codeset_util.rb (before str.force_encoding('UTF-8'))