aboutsummaryrefslogtreecommitdiffstats
path: root/test/open-uri
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-12-14 06:40:55 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-12-14 06:40:55 +0000
commitc81b224edca453ed8ea3030cc74b2ede5ac9e63a (patch)
tree91fad68f293185c4ac2ee01e568b91896ae04bb9 /test/open-uri
parentfcb4ab8d1c917b3f2a998f9b6eab3d9cec27670a (diff)
downloadruby-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')
-rw-r--r--test/open-uri/test_open-uri.rb2
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 }