suppress warning: attempt to close unfinished zstream; reset forced.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57127 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
naruse 2016-12-20 16:02:22 +00:00
parent ba568c0ea3
commit f3d0c2729a

View File

@ -213,8 +213,10 @@ if defined? Zlib
z = Zlib::Deflate.new z = Zlib::Deflate.new
z << "foo" z << "foo"
assert_raise(Zlib::StreamError) { z.set_dictionary("foo") } assert_raise(Zlib::StreamError) { z.set_dictionary("foo") }
EnvUtil.suppress_warning do
z.close # without this, outputs `zlib(finalizer): the stream was freed prematurely.' z.close # without this, outputs `zlib(finalizer): the stream was freed prematurely.'
end end
end
def test_reset def test_reset
z = Zlib::Deflate.new z = Zlib::Deflate.new