Permalink
Browse files

Remove a warning "shadowing outer local variable - r"

  • Loading branch information...
1 parent a088962 commit 6f109e8585127f8f33c7c814de3196f3aa825129 @kachick kachick committed Jan 11, 2013
Showing with 2 additions and 2 deletions.
  1. +2 −2 lib/graphviz/theory.rb
View
@@ -150,8 +150,8 @@ def critical_path
return nil if range.include?(nil) or @graph.type != "digraph"
r = [ [0, [1]] ]
- critical_path_recursion( distance_matrix, adjancy_matrix, r, [], 0 ).inject( {:distance => 0, :path => []} ) { |r, item|
- (r[:distance] < item[0]) ? { :distance => item[0], :path => item[1] } : r
+ critical_path_recursion( distance_matrix, adjancy_matrix, r, [], 0 ).inject( {:distance => 0, :path => []} ) { |_r, item|
+ (_r[:distance] < item[0]) ? { :distance => item[0], :path => item[1] } : _r
}
end

0 comments on commit 6f109e8

Please sign in to comment.