aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
Diffstat (limited to 'Library')
-rw-r--r--Library/Homebrew/extend/pathname.rb7
1 files changed, 2 insertions, 5 deletions
diff --git a/Library/Homebrew/extend/pathname.rb b/Library/Homebrew/extend/pathname.rb
index fc2df4407..fedb30ef8 100644
--- a/Library/Homebrew/extend/pathname.rb
+++ b/Library/Homebrew/extend/pathname.rb
@@ -211,11 +211,8 @@ class Pathname
def incremental_hash(hasher)
incr_hash = hasher.new
- self.open('r') do |f|
- while(buf = f.read(1024))
- incr_hash << buf
- end
- end
+ buf = ""
+ open('r') { |f| incr_hash << buf while f.read(1024, buf) }
incr_hash.hexdigest
end