]> source.dussan.org Git - redmine.git/commitdiff
Fixed: warning: class variable access from toplevel on Ruby 2.0 (#14511).
authorJean-Philippe Lang <jp_lang@yahoo.fr>
Sun, 28 Jul 2013 11:57:39 +0000 (11:57 +0000)
committerJean-Philippe Lang <jp_lang@yahoo.fr>
Sun, 28 Jul 2013 11:57:39 +0000 (11:57 +0000)
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@12052 e93f8b46-1217-0410-a6f0-8f06a7374b81

lib/SVG/Graph/Graph.rb

index 8a840b2f1ebf3ffe5b3f6d6b85ce4613d094842a..f048ac3823ab834eca594889a22733c71894c163 100644 (file)
@@ -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