From 5deaa3d56f13153b3c3e116f69e36016c2dc460a Mon Sep 17 00:00:00 2001 From: Jishin42 Date: Thu, 7 Jul 2016 14:09:50 +0200 Subject: [PATCH] Remove warnings The following warning were listed in ruby 2.2.3 after a require 'SVG/Graph/Plot' : - l143: duplicated key at line 145 ignored: :y_label_font_size - l3: class variable access from toplevel --- lib/SVG/Graph/Graph.rb | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/lib/SVG/Graph/Graph.rb b/lib/SVG/Graph/Graph.rb index e7a8117..aeb0253 100644 --- a/lib/SVG/Graph/Graph.rb +++ b/lib/SVG/Graph/Graph.rb @@ -1,14 +1,13 @@ -begin - require 'zlib' - @@__have_zlib = true -rescue - @@__have_zlib = false -end - require 'rexml/document' module SVG module Graph + begin + require 'zlib' + @@__have_zlib = true + rescue + @@__have_zlib = false + end # === Base object for generating SVG Graphs # @@ -142,7 +141,6 @@ def initialize( config ) :x_label_font_size =>12, :y_label_font_size =>12, :x_title_font_size =>14, - :y_label_font_size =>12, :y_title_font_size =>14, :key_font_size =>10,