From 1ed71080527f9f828cc3fb5508a3e0cd314e0505 Mon Sep 17 00:00:00 2001 From: Misty De Meo Date: Sat, 6 Feb 2016 14:19:58 -0800 Subject: Array#count alias didn't always exist Fixes mistydemeo/tigerbrew#408. --- Library/Homebrew/cmd/list.rb | 2 +- Library/Homebrew/patch.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'Library') diff --git a/Library/Homebrew/cmd/list.rb b/Library/Homebrew/cmd/list.rb index 1896b74f1..3f1909afb 100644 --- a/Library/Homebrew/cmd/list.rb +++ b/Library/Homebrew/cmd/list.rb @@ -100,7 +100,7 @@ module Homebrew else # --versions without --pinned names.each do |d| versions = d.subdirs.map { |pn| pn.basename.to_s } - next if ARGV.include?("--multiple") && versions.count < 2 + next if ARGV.include?("--multiple") && versions.length < 2 puts "#{d.basename} #{versions*" "}" end end diff --git a/Library/Homebrew/patch.rb b/Library/Homebrew/patch.rb index ebfb8e347..9adb1ffee 100644 --- a/Library/Homebrew/patch.rb +++ b/Library/Homebrew/patch.rb @@ -130,7 +130,7 @@ class ExternalPatch patch_dir = Pathname.pwd if patch_files.empty? children = patch_dir.children - if (children.count == 1 && children.first.file?) + if (children.length == 1 && children.first.file?) patch_files << children.first.basename else raise MissingApplyError, <<-EOS.undent -- cgit v1.2.3