diff options
Diffstat (limited to 'activestorage/test/filename_test.rb')
-rw-r--r-- | activestorage/test/filename_test.rb | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/activestorage/test/filename_test.rb b/activestorage/test/filename_test.rb index e448238675..f1e4a467ba 100644 --- a/activestorage/test/filename_test.rb +++ b/activestorage/test/filename_test.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "test_helper" class ActiveStorage::FilenameTest < ActiveSupport::TestCase @@ -10,8 +12,8 @@ class ActiveStorage::FilenameTest < ActiveSupport::TestCase end test "sanitize transcodes to valid UTF-8" do - { "\xF6".force_encoding(Encoding::ISO8859_1) => "ö", - "\xC3".force_encoding(Encoding::ISO8859_1) => "Ã", + { "\xF6".dup.force_encoding(Encoding::ISO8859_1) => "ö", + "\xC3".dup.force_encoding(Encoding::ISO8859_1) => "Ã", "\xAD" => "�", "\xCF" => "�", "\x00" => "", |