From fb6867c36398ec7fb7e983a6f40b08c2ca51af51 Mon Sep 17 00:00:00 2001 From: Jack Nagel Date: Thu, 5 Dec 2013 15:08:37 -0600 Subject: [PATCH] String isn't Enumerable in 1.9+ --- Library/Homebrew/cmd/bottle.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Library/Homebrew/cmd/bottle.rb b/Library/Homebrew/cmd/bottle.rb index 03e77d793a..14f0da0792 100644 --- a/Library/Homebrew/cmd/bottle.rb +++ b/Library/Homebrew/cmd/bottle.rb @@ -49,8 +49,8 @@ module Homebrew extend self end # Find all files that still reference the keg via a string search - keg_ref_files = `/usr/bin/fgrep --files-with-matches --recursive "#{string}" "#{keg}" 2>/dev/null` - keg_ref_files = (keg_ref_files.map{ |file| Pathname.new(file.strip) }).reject(&:symlink?) + keg_ref_files = `/usr/bin/fgrep --files-with-matches --recursive "#{string}" "#{keg}" 2>/dev/null`.split + keg_ref_files.map! { |file| Pathname.new(file) }.reject!(&:symlink?) # If there are no files with that string found, return immediately return false if keg_ref_files.empty?