]> source.dussan.org Git - redmine.git/commitdiff
Fixes SVG lib for ruby1.9.
authorJean-Philippe Lang <jp_lang@yahoo.fr>
Sat, 7 Nov 2009 10:40:54 +0000 (10:40 +0000)
committerJean-Philippe Lang <jp_lang@yahoo.fr>
Sat, 7 Nov 2009 10:40:54 +0000 (10:40 +0000)
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@3017 e93f8b46-1217-0410-a6f0-8f06a7374b81

lib/SVG/Graph/Graph.rb

index c188ae51dcf4cf51176282ebe336e4c6d35432da..497bb7c38ce3381ea45bdb59e1f5a9425105c089 100644 (file)
@@ -150,7 +150,7 @@ module SVG
           :add_popups           =>false,\r
         })\r
 \r
-                               set_defaults if methods.include? "set_defaults"\r
+                               set_defaults if respond_to? :set_defaults\r
 \r
         init_with config\r
       end\r
@@ -195,7 +195,7 @@ module SVG
       def burn\r
         raise "No data available" unless @data.size > 0\r
         \r
-        calculations if methods.include? 'calculations'\r
+        calculations if respond_to? :calculations\r
 \r
         start_svg\r
         calculate_graph_dimensions\r
@@ -355,7 +355,7 @@ module SVG
       # by subclasses.\r
       def init_with config\r
         config.each { |key, value|\r
-          self.send( key.to_s+"=", value ) if methods.include? key.to_s\r
+          self.send((key.to_s+"=").to_sym, value ) if respond_to? key.to_sym\r
         }\r
       end\r
 \r