diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2015-12-14 06:40:55 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2015-12-14 06:40:55 +0000 |
commit | c81b224edca453ed8ea3030cc74b2ede5ac9e63a (patch) | |
tree | 91fad68f293185c4ac2ee01e568b91896ae04bb9 /test/open-uri/test_open-uri.rb | |
parent | fcb4ab8d1c917b3f2a998f9b6eab3d9cec27670a (diff) | |
download | ruby-c81b224edca453ed8ea3030cc74b2ede5ac9e63a.tar.gz |
test: use String#b instead of dup.force_encoding
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53109 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/open-uri/test_open-uri.rb')
-rw-r--r-- | test/open-uri/test_open-uri.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/test/open-uri/test_open-uri.rb b/test/open-uri/test_open-uri.rb index 19451e25ee..b3702e6067 100644 --- a/test/open-uri/test_open-uri.rb +++ b/test/open-uri/test_open-uri.rb @@ -601,7 +601,7 @@ class TestOpenURI < Test::Unit::TestCase def test_content_encoding with_http {|srv, dr, url| content = "abc" * 10000 - Zlib::GzipWriter.wrap(StringIO.new(content_gz="".dup.force_encoding("ascii-8bit"))) {|z| z.write content } + Zlib::GzipWriter.wrap(StringIO.new(content_gz="".b)) {|z| z.write content } srv.mount_proc("/data/") {|req, res| res.body = content_gz; res['content-encoding'] = 'gzip' } srv.mount_proc("/data2/") {|req, res| res.body = content_gz; res['content-encoding'] = 'gzip'; res.chunked = true } srv.mount_proc("/noce/") {|req, res| res.body = content_gz } |