diff options
author | Matthew Draper <matthew@trebex.net> | 2017-07-10 00:07:03 +0930 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-07-10 00:07:03 +0930 |
commit | 551f88366dcbaed3b0abc89bddd63975c4c9a5ca (patch) | |
tree | ab9306fac3d48ff7dc8556076c8d07b38bcfc381 /actionpack/test/dispatch | |
parent | 8d98bb0cc6e2baf1694971ae2bdf19e8b8bcdce5 (diff) | |
parent | b3f3d49fd6b91c6573b3e10e3d00f65306638927 (diff) | |
download | rails-551f88366dcbaed3b0abc89bddd63975c4c9a5ca.tar.gz rails-551f88366dcbaed3b0abc89bddd63975c4c9a5ca.tar.bz2 rails-551f88366dcbaed3b0abc89bddd63975c4c9a5ca.zip |
Merge pull request #29655 from kirs/frozen-friendly-ap-ar
Prepare AP and AR to be frozen string friendly
Diffstat (limited to 'actionpack/test/dispatch')
-rw-r--r-- | actionpack/test/dispatch/debug_exceptions_test.rb | 3 | ||||
-rw-r--r-- | actionpack/test/dispatch/prefix_generation_test.rb | 3 | ||||
-rw-r--r-- | actionpack/test/dispatch/static_test.rb | 5 |
3 files changed, 7 insertions, 4 deletions
diff --git a/actionpack/test/dispatch/debug_exceptions_test.rb b/actionpack/test/dispatch/debug_exceptions_test.rb index ea477e8908..bf07410d0d 100644 --- a/actionpack/test/dispatch/debug_exceptions_test.rb +++ b/actionpack/test/dispatch/debug_exceptions_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "abstract_unit" class DebugExceptionsTest < ActionDispatch::IntegrationTest @@ -344,7 +345,7 @@ class DebugExceptionsTest < ActionDispatch::IntegrationTest }) assert_response 500 - assert_includes(body, CGI.escapeHTML(PP.pp(params, "", 200))) + assert_includes(body, CGI.escapeHTML(PP.pp(params, "".dup, 200))) end test "sets the HTTP charset parameter" do diff --git a/actionpack/test/dispatch/prefix_generation_test.rb b/actionpack/test/dispatch/prefix_generation_test.rb index 0e093d2188..3cd9344c04 100644 --- a/actionpack/test/dispatch/prefix_generation_test.rb +++ b/actionpack/test/dispatch/prefix_generation_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "abstract_unit" require "rack/test" require "rails/engine" @@ -11,7 +12,7 @@ module TestGenerationPrefix end def self.model_name - klass = "Post" + klass = "Post".dup def klass.name; self end ActiveModel::Name.new(klass) diff --git a/actionpack/test/dispatch/static_test.rb b/actionpack/test/dispatch/static_test.rb index 3082d1072b..50780a1dd0 100644 --- a/actionpack/test/dispatch/static_test.rb +++ b/actionpack/test/dispatch/static_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "abstract_unit" require "zlib" @@ -29,7 +30,7 @@ module StaticTests end def test_handles_urls_with_ascii_8bit - assert_equal "Hello, World!", get("/doorkeeper%E3E4".force_encoding("ASCII-8BIT")).body + assert_equal "Hello, World!", get("/doorkeeper%E3E4".dup.force_encoding("ASCII-8BIT")).body end def test_handles_urls_with_ascii_8bit_on_win_31j @@ -37,7 +38,7 @@ module StaticTests Encoding.default_internal = "Windows-31J" Encoding.default_external = "Windows-31J" end - assert_equal "Hello, World!", get("/doorkeeper%E3E4".force_encoding("ASCII-8BIT")).body + assert_equal "Hello, World!", get("/doorkeeper%E3E4".dup.force_encoding("ASCII-8BIT")).body end def test_handles_urls_with_null_byte |