diff options
author | Pat Allan <pat@freelancing-gods.com> | 2017-06-21 19:16:51 +1000 |
---|---|---|
committer | Pat Allan <pat@freelancing-gods.com> | 2017-06-21 19:16:51 +1000 |
commit | 177894feac42893b87ffee8473a2b1899a8ca5f4 (patch) | |
tree | 15d19921d69f808a48a66941d9cd41890764beaf /test/spec_response.rb | |
parent | c1437097dcdf92d53a692ca8135a3391791fbca3 (diff) | |
download | rack-177894feac42893b87ffee8473a2b1899a8ca5f4.tar.gz |
Updates for frozen string literal compatibility.
Diffstat (limited to 'test/spec_response.rb')
-rw-r--r-- | test/spec_response.rb | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/test/spec_response.rb b/test/spec_response.rb index 4fd7d2b3..b24cfd16 100644 --- a/test/spec_response.rb +++ b/test/spec_response.rb @@ -231,12 +231,12 @@ describe Rack::Response do it "has a useful constructor" do r = Rack::Response.new("foo") status, header, body = r.finish - str = ""; body.each { |part| str << part } + str = "".dup; body.each { |part| str << part } str.must_equal "foo" r = Rack::Response.new(["foo", "bar"]) status, header, body = r.finish - str = ""; body.each { |part| str << part } + str = "".dup; body.each { |part| str << part } str.must_equal "foobar" object_with_each = Object.new @@ -247,7 +247,7 @@ describe Rack::Response do r = Rack::Response.new(object_with_each) r.write "foo" status, header, body = r.finish - str = ""; body.each { |part| str << part } + str = "".dup; body.each { |part| str << part } str.must_equal "foobarfoo" r = Rack::Response.new([], 500) @@ -263,7 +263,7 @@ describe Rack::Response do res.write "foo" } status, _, body = r.finish - str = ""; body.each { |part| str << part } + str = "".dup; body.each { |part| str << part } str.must_equal "foo" status.must_equal 404 end @@ -271,7 +271,7 @@ describe Rack::Response do it "doesn't return invalid responses" do r = Rack::Response.new(["foo", "bar"], 204) _, header, body = r.finish - str = ""; body.each { |part| str << part } + str = "".dup; body.each { |part| str << part } str.must_be :empty? header["Content-Type"].must_be_nil header['Content-Length'].must_be_nil |