diff --git a/lib/guard/listener.rb b/lib/guard/listener.rb index 9ea5948..1017c51 100644 --- a/lib/guard/listener.rb +++ b/lib/guard/listener.rb @@ -1,4 +1,5 @@ require 'rbconfig' +require 'digest/sha1' module Guard @@ -53,7 +54,7 @@ module Guard end def file_content_modified?(path) - sha1_checksum = Digest::SHA1.file(path).to_s + sha1_checksum = ::Digest::SHA1.file(path).to_s if sha1_checksums_hash[path] != sha1_checksum @sha1_checksums_hash[path] = sha1_checksum true diff --git a/lib/guard/watcher.rb b/lib/guard/watcher.rb index fc16b23..074e7c2 100644 --- a/lib/guard/watcher.rb +++ b/lib/guard/watcher.rb @@ -59,4 +59,4 @@ module Guard end end -end \ No newline at end of file +end