diff options
| author | Misty De Meo | 2013-10-26 21:48:14 -0700 |
|---|---|---|
| committer | Misty De Meo | 2013-10-26 21:51:30 -0700 |
| commit | ef5b82c65f3935abab266990ee4caaf154d1a6f4 (patch) | |
| tree | f6150ceeccaf119fa354a12bc46633aea7b3de39 /Library | |
| parent | 7ae078b08eb916ac97f0d2e19522a69d8ae0aab9 (diff) | |
| download | homebrew-ef5b82c65f3935abab266990ee4caaf154d1a6f4.tar.bz2 | |
brew-unpack: use #length == 1, not #one?
Array#one? wasn't yet defined in Ruby 1.8.6. In this case the block form
isn't being used, so Array.length == 1 is a simple replacement.
Fixes mistydemeo/tigerbrew#123.
Diffstat (limited to 'Library')
| -rwxr-xr-x | Library/Contributions/cmd/brew-unpack.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Library/Contributions/cmd/brew-unpack.rb b/Library/Contributions/cmd/brew-unpack.rb index e4ff31434..96ea9148a 100755 --- a/Library/Contributions/cmd/brew-unpack.rb +++ b/Library/Contributions/cmd/brew-unpack.rb @@ -89,7 +89,7 @@ module Homebrew extend self ENV['VERBOSE'] = '1' # show messages about tar f.brew do entries = Dir['*'] - cd entries.first if entries.one? && File.directory?(entries.first) + cd entries.first if entries.length == 1 && File.directory?(entries.first) cp_r getwd, stage_dir end ENV['VERBOSE'] = nil |
