diff options
Diffstat (limited to 'test/zlib/test_zlib.rb')
-rw-r--r-- | test/zlib/test_zlib.rb | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/test/zlib/test_zlib.rb b/test/zlib/test_zlib.rb index bff616a235..56940ace8c 100644 --- a/test/zlib/test_zlib.rb +++ b/test/zlib/test_zlib.rb @@ -237,8 +237,9 @@ if defined? Zlib t.close Zlib::GzipWriter.open(t.path) {|gz| gz.print("foo") } - f = Zlib::GzipReader.open(t.path) - assert_kind_of(IO, f.to_io) + Zlib::GzipReader.open(t.path) do |f| + assert_kind_of(IO, f.to_io) + end end def test_crc |