lib/spring/watcher/abstract.rb in spring-3.1.1 vs lib/spring/watcher/abstract.rb in spring-4.0.0
- old
+ new
@@ -17,12 +17,12 @@
def initialize(root, latency)
super()
@root = File.realpath(root)
@latency = latency
- @files = Set.new
- @directories = Set.new
+ @files = {}
+ @directories = {}
@stale = false
@listeners = []
@on_debug = nil
end
@@ -61,13 +61,13 @@
end
synchronize {
items.each do |item|
if item.directory?
- directories << item.realpath.to_s
+ directories[item.realpath.to_s] = true
else
begin
- files << item.realpath.to_s
+ files[item.realpath.to_s] = true
rescue Errno::ENOENT
# Race condition. Ignore symlinks whose target was removed
# since the check above, or are deeply chained.
debug { "add: ignoring now-dangling symlink: #{item.inspect} -> #{item.readlink.inspect}" }
end