aboutsummaryrefslogtreecommitdiffstats
path: root/test/open-uri/test_open-uri.rb
diff options
context:
space:
mode:
Diffstat (limited to 'test/open-uri/test_open-uri.rb')
-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 }