summaryrefslogtreecommitdiff
path: root/test/zlib
diff options
context:
space:
mode:
authorglass <glass@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-05-10 03:43:22 +0000
committerglass <glass@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-05-10 03:43:22 +0000
commitd88957abad479e3580dc646ab32707a9aaa80c11 (patch)
tree1b26f0ce6a628a7f404032e3841e7ae5d87bff03 /test/zlib
parent0c14c3ab0b1bbf3f2a5b2c0accb2a53528635e44 (diff)
* ext/zlib/zlib.c (rb_gzreader_external_encoding):
define GzipReader#external_encoding. [Bug #10900] * test/zlib/test_zlib.rb: test for above. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50460 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/zlib')
-rw-r--r--test/zlib/test_zlib.rb5
1 files changed, 4 insertions, 1 deletions
diff --git a/test/zlib/test_zlib.rb b/test/zlib/test_zlib.rb
index 63bbd27..f52c7e0 100644
--- a/test/zlib/test_zlib.rb
+++ b/test/zlib/test_zlib.rb
@@ -953,7 +953,10 @@ if defined? Zlib
content = (0..255).to_a.pack('c*')
Zlib::GzipWriter.wrap(t) {|gz| gz.print(content) }
- read_all = Zlib::GzipReader.open(t.path) {|gz| gz.read }
+ read_all = Zlib::GzipReader.open(t.path) do |gz|
+ assert_equal(Encoding.default_external, gz.external_encoding)
+ gz.read
+ end
assert_equal(Encoding.default_external, read_all.encoding)
# chunks are in BINARY regardless of encoding settings