From b724eb4fece625f085c5f29d37a1f62f38e8c7fd Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Sun, 28 Jul 2013 12:09:47 +0000 Subject: [PATCH] Merged r12052 from trunk (#14511). git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/branches/2.3-stable@12053 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- lib/SVG/Graph/Graph.rb | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/lib/SVG/Graph/Graph.rb b/lib/SVG/Graph/Graph.rb index 8a840b2f1..f048ac382 100644 --- a/lib/SVG/Graph/Graph.rb +++ b/lib/SVG/Graph/Graph.rb @@ -1,8 +1,7 @@ begin require 'zlib' - @@__have_zlib = true rescue - @@__have_zlib = false + # Zlib not available end require 'rexml/document' @@ -211,7 +210,7 @@ module SVG @doc.write( data, 0 ) if @config[:compress] - if @@__have_zlib + if Object.const_defined?(:Zlib) inp, out = IO.pipe gz = Zlib::GzipWriter.new( out ) gz.write data -- 2.39.5