diff options
author | Matthew Draper <matthew@trebex.net> | 2017-08-13 21:39:38 +0930 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-08-13 21:39:38 +0930 |
commit | 4ec5b7610dc040c616b6d058cc23c5af887ec221 (patch) | |
tree | 4e6dafd8144b0762e5d196781e26c2b940ba9299 /activestorage/test/filename_test.rb | |
parent | c8c20290419ad2f4b60df0297ace22b8f7f40f2b (diff) | |
parent | d02844f2499be488d262bc274530ec44e242fd70 (diff) | |
download | rails-4ec5b7610dc040c616b6d058cc23c5af887ec221.tar.gz rails-4ec5b7610dc040c616b6d058cc23c5af887ec221.tar.bz2 rails-4ec5b7610dc040c616b6d058cc23c5af887ec221.zip |
Merge pull request #30211 from koic/frozen_activestorage
Use frozen string literal in Active Storage
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" => "", |