lib/bundler/dependencies/visitor.rb in bundler-dependencies-0.6.0 vs lib/bundler/dependencies/visitor.rb in bundler-dependencies-1.0.0
- old
+ new
@@ -1,10 +1,12 @@
+# frozen_string_literal: true
+
module Bundler
module Dependencies
class Visitor
def self.walk(graph, depth = 0, &block)
graph.each do |gem|
- block.call(gem, depth)
+ yield(gem, depth)
walk(gem.dependencies, depth + 1, &block) if gem.dependencies
end
end
end
end