aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport
diff options
context:
space:
mode:
Diffstat (limited to 'activesupport')
-rw-r--r--activesupport/lib/active_support/file_evented_update_checker.rb11
1 files changed, 4 insertions, 7 deletions
diff --git a/activesupport/lib/active_support/file_evented_update_checker.rb b/activesupport/lib/active_support/file_evented_update_checker.rb
index ca3788a187..8cb422ad36 100644
--- a/activesupport/lib/active_support/file_evented_update_checker.rb
+++ b/activesupport/lib/active_support/file_evented_update_checker.rb
@@ -72,14 +72,11 @@ module ActiveSupport
end
def directories_to_watch
- bd = []
+ dtw = (@files + @dirs.keys).map {|f| @ph.existing_parent(f)}
+ dtw.compact!
+ dtw.uniq!
- bd.concat @files.map {|f| @ph.existing_parent(f.dirname)}
- bd.concat @dirs.keys.map {|dir| @ph.existing_parent(dir)}
- bd.compact!
- bd.uniq!
-
- @ph.filter_out_descendants(bd)
+ @ph.filter_out_descendants(dtw)
end
class PathHelper