diff options
Diffstat (limited to 'Library')
| -rw-r--r-- | Library/Homebrew/utils/inreplace.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Library/Homebrew/utils/inreplace.rb b/Library/Homebrew/utils/inreplace.rb index accb7d83c..b4bc05468 100644 --- a/Library/Homebrew/utils/inreplace.rb +++ b/Library/Homebrew/utils/inreplace.rb @@ -2,7 +2,7 @@ module Utils module Inreplace def inreplace paths, before=nil, after=nil Array(paths).each do |path| - f = File.open(path, 'r') + f = File.open(path, 'rb') s = f.read if before.nil? && after.nil? @@ -17,7 +17,7 @@ module Utils end end - f.reopen(path, 'w').write(s) + f.reopen(path, 'wb').write(s) f.close end end |
