Add comment about refinement scope.

This commit is contained in:
Markus Reiter 2018-08-27 17:45:01 +02:00
parent 2773ce6156
commit ccf396887a

View File

@ -213,6 +213,7 @@ module Homebrew
return if dry_run?
return unless (cache/"downloads").directory?
# We can't use `.reject(&:incomplete?) here due to the refinement scope.
downloads = (cache/"downloads").children.reject { |path| path.incomplete? } # rubocop:disable Style/SymbolProc
referenced_downloads = [cache, cache/"Cask"].select(&:directory?)
.flat_map(&:children)