diff options
| author | Jack Nagel | 2014-06-04 01:35:12 -0500 |
|---|---|---|
| committer | Jack Nagel | 2014-06-04 01:37:56 -0500 |
| commit | 9d46c6fcb66c5a57c4ebaa63ab6aa662485870e3 (patch) | |
| tree | c55f02e42cfc008aa3ae04aee270c899b7520c77 /Library | |
| parent | 8899c0416ea0f6a4ddf2bc2e01756d9a2d5f1041 (diff) | |
| download | homebrew-9d46c6fcb66c5a57c4ebaa63ab6aa662485870e3.tar.bz2 | |
Fix some places where encoding issues manifest on ruby 2.0
Diffstat (limited to 'Library')
| -rw-r--r-- | Library/Homebrew/cmd/bottle.rb | 2 | ||||
| -rw-r--r-- | Library/Homebrew/download_strategy.rb | 2 | ||||
| -rw-r--r-- | Library/Homebrew/keg_fix_install_names.rb | 2 |
3 files changed, 3 insertions, 3 deletions
diff --git a/Library/Homebrew/cmd/bottle.rb b/Library/Homebrew/cmd/bottle.rb index 6d3f9ba92..8c07a6f8d 100644 --- a/Library/Homebrew/cmd/bottle.rb +++ b/Library/Homebrew/cmd/bottle.rb @@ -67,7 +67,7 @@ module Homebrew extend self end # Use strings to search through the file for each string - IO.popen("strings -t x - '#{file}'") do |io| + IO.popen("strings -t x - '#{file}'", "rb") do |io| until io.eof? str = io.readline.chomp diff --git a/Library/Homebrew/download_strategy.rb b/Library/Homebrew/download_strategy.rb index cc1380bcc..646c08c18 100644 --- a/Library/Homebrew/download_strategy.rb +++ b/Library/Homebrew/download_strategy.rb @@ -144,7 +144,7 @@ class CurlDownloadStrategy < AbstractDownloadStrategy def buffered_write(tool) target = File.basename(basename_without_params, tarball_path.extname) - IO.popen("#{tool} -f '#{tarball_path}' -c") do |pipe| + IO.popen("#{tool} -f '#{tarball_path}' -c", "rb") do |pipe| File.open(target, "wb") do |f| buf = "" f.write(buf) while pipe.read(1024, buf) diff --git a/Library/Homebrew/keg_fix_install_names.rb b/Library/Homebrew/keg_fix_install_names.rb index 35d3ddc09..f45d88aba 100644 --- a/Library/Homebrew/keg_fix_install_names.rb +++ b/Library/Homebrew/keg_fix_install_names.rb @@ -86,7 +86,7 @@ class Keg < Pathname end def each_unique_file_matching string - IO.popen("/usr/bin/fgrep -lr '#{string}' '#{self}' 2>/dev/null") do |io| + IO.popen("/usr/bin/fgrep -lr '#{string}' '#{self}' 2>/dev/null", "rb") do |io| hardlinks = Set.new until io.eof? |
