From dc3eac9e96dc76c7fabc6e663494ee0194009d9e Mon Sep 17 00:00:00 2001 From: Jim Dalton Date: Sat, 16 Jan 2016 11:58:00 -0800 Subject: [PATCH] Use correct type for removed paths passed to update --- middleman-core/lib/middleman-core/sources/source_watcher.rb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/middleman-core/lib/middleman-core/sources/source_watcher.rb b/middleman-core/lib/middleman-core/sources/source_watcher.rb index 43efdb21..1af9370c 100644 --- a/middleman-core/lib/middleman-core/sources/source_watcher.rb +++ b/middleman-core/lib/middleman-core/sources/source_watcher.rb @@ -91,7 +91,7 @@ module Middleman stop_listener! if @listener - update([], @files.values) + update([], @files.values.map { |source_file| source_file[:full_path] }) poll_once! @@ -262,11 +262,13 @@ module Middleman ]) unless valid_updates.empty? && valid_removes.empty? end + Contract IsA['Middleman::SourceFile'] => Any def add_file_to_cache(f) @files[f[:full_path]] = f @extensionless_files[strip_extensions(f[:full_path])] = f end + Contract IsA['Middleman::SourceFile'] => Any def remove_file_from_cache(f) @files.delete(f[:full_path]) @extensionless_files.delete(strip_extensions(f[:full_path]))