Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion test/zlib/test_zlib.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@
begin
require 'zlib'
rescue LoadError
else
z = "/zlib.#{RbConfig::CONFIG["DLEXT"]}"
LOADED_ZLIB, = $".select {|f| f.end_with?(z)}
end

if defined? Zlib
Expand Down Expand Up @@ -1525,7 +1528,7 @@ def test_gunzip_encoding
end

def test_gunzip_no_memory_leak
assert_no_memory_leak(%[-rzlib], "#{<<~"{#"}", "#{<<~'};'}")
assert_no_memory_leak(%W[-r#{LOADED_ZLIB}], "#{<<~"{#"}", "#{<<~'};'}")
d = Zlib.gzip("data")
{#
10_000.times {Zlib.gunzip(d)}
Expand Down