aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/compilers.rb
diff options
context:
space:
mode:
authorJack Nagel2014-08-06 09:56:09 -0500
committerJack Nagel2014-08-06 09:56:09 -0500
commit1eecf1ac0bcf8b1c3c76defab7d27be97c493f0d (patch)
tree8a00a1cc3e3862a8201f0c2fe66312eea211dfc2 /Library/Homebrew/compilers.rb
parented5eef82a861ce78b7771629d4f93ca89d73a0a3 (diff)
downloadbrew-1eecf1ac0bcf8b1c3c76defab7d27be97c493f0d.tar.bz2
Don't use Hash#first
Fixes Homebrew/homebrew#31360.
Diffstat (limited to 'Library/Homebrew/compilers.rb')
-rw-r--r--Library/Homebrew/compilers.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/Library/Homebrew/compilers.rb b/Library/Homebrew/compilers.rb
index 55f8c3fe0..7080f69e7 100644
--- a/Library/Homebrew/compilers.rb
+++ b/Library/Homebrew/compilers.rb
@@ -31,7 +31,7 @@ class CompilerFailure
def self.create(spec, &block)
# Non-Apple compilers are in the format fails_with compiler => version
if spec.is_a?(Hash)
- _, major_version = spec.first
+ _, major_version = spec.each { |e| break e }
name = "gcc-#{major_version}"
# so fails_with :gcc => '4.8' simply marks all 4.8 releases incompatible
version = "#{major_version}.999"