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
Родитель ba568c0ea3
Коммит f3d0c2729a
1 изменённых файлов: 3 добавлений и 1 удалений

Просмотреть файл

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