summaryrefslogtreecommitdiff
path: root/ext/digest/lib/digest.rb
diff options
context:
space:
mode:
Diffstat (limited to 'ext/digest/lib/digest.rb')
-rw-r--r--ext/digest/lib/digest.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/ext/digest/lib/digest.rb b/ext/digest/lib/digest.rb
index e8f54eae59f..6ee1a0fbdfa 100644
--- a/ext/digest/lib/digest.rb
+++ b/ext/digest/lib/digest.rb
@@ -13,7 +13,7 @@ module Digest
# # => "f02e3c85572dc9ad7cb77c2a638e3be24cc1b5bea9fdbb0b0299c9668475c534"
def self.file(name)
digest = self.new
- File.open(name) {|f|
+ File.open(name, "rb") {|f|
buf = ""
while f.read(16384, buf)
digest.update buf