summaryrefslogtreecommitdiff
path: root/test/open-uri
diff options
context:
space:
mode:
Diffstat (limited to 'test/open-uri')
-rw-r--r--test/open-uri/test_open-uri.rb7
1 files changed, 5 insertions, 2 deletions
diff --git a/test/open-uri/test_open-uri.rb b/test/open-uri/test_open-uri.rb
index 0cae2d56fd..2b0cfc622f 100644
--- a/test/open-uri/test_open-uri.rb
+++ b/test/open-uri/test_open-uri.rb
@@ -2,7 +2,10 @@ require 'test/unit'
require 'open-uri'
require 'webrick'
require 'webrick/httpproxy'
-require 'zlib'
+begin
+ require 'zlib'
+rescue LoadError
+end
class TestOpenURI < Test::Unit::TestCase
@@ -497,7 +500,7 @@ class TestOpenURI < Test::Unit::TestCase
assert_equal(content_gz, f.read.force_encoding("ascii-8bit"))
}
}
- end
+ end if defined?(Zlib::GzipWriter)
# 192.0.2.0/24 is TEST-NET. [RFC3330]