From 307d13a517b9a94c4b533a9c6fdeb814ea64026a Mon Sep 17 00:00:00 2001 From: John Bintz Date: Mon, 23 May 2011 21:36:51 -0400 Subject: [PATCH] fix for resolving the digest module --- lib/guard/listener.rb | 3 ++- lib/guard/watcher.rb | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) 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