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 9ea594864..1017c5103 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 @@ def file_modified?(path) 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 fc16b23a8..074e7c2ea 100644 --- a/lib/guard/watcher.rb +++ b/lib/guard/watcher.rb @@ -59,4 +59,4 @@ def call_action(matches) end end -end \ No newline at end of file +end