Permalink
Browse files

Remove warnings "assigned but unused variable"

  • Loading branch information...
1 parent bdde7a5 commit 20f8926548448379b42a350672c0421a7908c671 @kachick kachick committed Jan 11, 2013
Showing with 4 additions and 4 deletions.
  1. +2 −2 lib/graphviz.rb
  2. +1 −1 lib/graphviz/core_ext.rb
  3. +1 −1 lib/graphviz/theory.rb
View
4 lib/graphviz.rb
@@ -484,7 +484,7 @@ def output( hOpts = {} )
begin
require 'graphviz/nothugly'
@nothugly = true
- rescue LoadError => e
+ rescue LoadError
warn "You must install ruby-xslt or libxslt-ruby to use nothugly option!"
@nothugly = false
end
@@ -914,7 +914,7 @@ def self.generate(num_nodes, num_edges, directed = false, weight_range = (1..1))
end
nodes = (1..num_nodes).map{ |e| e.to_s }
- x = g.add_nodes(nodes)
+ g.add_nodes(nodes)
edges = []
nodes.each do |head|
View
2 lib/graphviz/core_ext.rb
@@ -17,7 +17,7 @@ class Object
def to_ruby
begin
eval self
- rescue => e
+ rescue
self
end
end
View
2 lib/graphviz/theory.rb
@@ -309,7 +309,7 @@ def critical_path_recursion( d, a, r, result, level )
cpath = [ (p[0] + d[node,succ]), (p[1].clone << succ) ]
if index_of_item( a.line(succ), 1 ).size > 0
- capth = critical_path_recursion( d, a, [cpath], result, level+1 )
+ critical_path_recursion( d, a, [cpath], result, level+1 )
else
result << cpath
end

0 comments on commit 20f8926

Please sign in to comment.