Skip to content
This repository
Browse code

Remove warnings "assigned but unused variable"

  • Loading branch information...
commit 20f8926548448379b42a350672c0421a7908c671 1 parent bdde7a5
Kenichi Kamiya authored
4  lib/graphviz.rb
@@ -484,7 +484,7 @@ def output( hOpts = {} )
484 484
             begin
485 485
               require 'graphviz/nothugly'
486 486
               @nothugly = true
487  
-            rescue LoadError => e
  487
+            rescue LoadError
488 488
               warn "You must install ruby-xslt or libxslt-ruby to use nothugly option!"
489 489
               @nothugly = false
490 490
             end
@@ -914,7 +914,7 @@ def self.generate(num_nodes, num_edges, directed = false, weight_range = (1..1))
914 914
      end
915 915
 
916 916
      nodes = (1..num_nodes).map{ |e| e.to_s }
917  
-     x = g.add_nodes(nodes)
  917
+     g.add_nodes(nodes)
918 918
 
919 919
      edges = []
920 920
      nodes.each do |head|
2  lib/graphviz/core_ext.rb
@@ -17,7 +17,7 @@ class Object
17 17
    def to_ruby
18 18
       begin
19 19
          eval self
20  
-      rescue => e
  20
+      rescue
21 21
          self
22 22
       end
23 23
    end
2  lib/graphviz/theory.rb
@@ -309,7 +309,7 @@ def critical_path_recursion( d, a, r, result, level )
309 309
                cpath = [ (p[0] + d[node,succ]), (p[1].clone << succ) ]
310 310
 
311 311
                if index_of_item( a.line(succ), 1 ).size > 0
312  
-                  capth = critical_path_recursion( d, a, [cpath], result, level+1 )
  312
+                  critical_path_recursion( d, a, [cpath], result, level+1 )
313 313
                else
314 314
                   result << cpath
315 315
                end

0 notes on commit 20f8926

Please sign in to comment.
Something went wrong with that request. Please try again.