Array#count alias didn't always exist

Fixes mistydemeo/tigerbrew#408.
This commit is contained in:
Misty De Meo 2016-02-06 14:19:58 -08:00
parent 268fa841de
commit 1ed7108052
2 changed files with 2 additions and 2 deletions

View File

@ -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

View File

@ -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