Permalink
Browse files

Inject is unnecessary.

  • Loading branch information...
1 parent 3460905 commit c71cbb58cbe8d813bad8879de3e233432e93d731 @threedaymonk threedaymonk committed Apr 16, 2012
Showing with 1 addition and 3 deletions.
  1. +1 −3 lib/bowler/dependency_tree.rb
@@ -14,9 +14,7 @@ def initialize(definition)
end
def dependencies_for(processes)
- processes.inject([]) do |array, p|
- array += [ (@definition.tree[p] || []), p ].flatten
- end.uniq
+ processes.map { |p| [@definition.tree[p], p] }.flatten.compact.uniq
end
def process_list_for(processes)

0 comments on commit c71cbb5

Please sign in to comment.