summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2013-07-28 11:57:39 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2013-07-28 11:57:39 +0000
commit9a0db9cb888c16f72a626ac8202dfbc189d18e05 (patch)
tree34e6ede600c1d165127e6746a218edef9e42b648 /lib
parent642a892c05604055fb0821939c0aa8736b0353d5 (diff)
downloadredmine-9a0db9cb888c16f72a626ac8202dfbc189d18e05.tar.gz
redmine-9a0db9cb888c16f72a626ac8202dfbc189d18e05.zip
Fixed: warning: class variable access from toplevel on Ruby 2.0 (#14511).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@12052 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'lib')
-rw-r--r--lib/SVG/Graph/Graph.rb5
1 files 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