aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew
diff options
context:
space:
mode:
authorJack Nagel2014-08-03 10:47:47 -0500
committerJack Nagel2014-08-03 10:47:47 -0500
commite5d6247ae7b33a76e90610c94d29b025d6be20fc (patch)
treef53fd1f1d2b6db6647f8f445a4eb2f07dea6c2ae /Library/Homebrew
parent2fedd5b09ad9b3a2b9f80a1cb8b3b2d13ff7b5f5 (diff)
downloadbrew-e5d6247ae7b33a76e90610c94d29b025d6be20fc.tar.bz2
Rename compiler attribute to name
Diffstat (limited to 'Library/Homebrew')
-rw-r--r--Library/Homebrew/compilers.rb12
-rw-r--r--Library/Homebrew/formula.rb2
2 files changed, 7 insertions, 7 deletions
diff --git a/Library/Homebrew/compilers.rb b/Library/Homebrew/compilers.rb
index 34b7d6963..b9fb9e199 100644
--- a/Library/Homebrew/compilers.rb
+++ b/Library/Homebrew/compilers.rb
@@ -12,7 +12,7 @@ class Compiler < Struct.new(:name, :version, :priority)
end
class CompilerFailure
- attr_reader :compiler, :major_version
+ attr_reader :name, :major_version
attr_rw :cause, :version
# Allows Apple compiler `fails_with` statements to keep using `build`
@@ -29,20 +29,20 @@ class CompilerFailure
# Non-Apple compilers are in the format fails_with compiler => version
if spec.is_a?(Hash)
_, major_version = spec.first
- compiler = "gcc-#{major_version}"
+ name = "gcc-#{major_version}"
# so fails_with :gcc => '4.8' simply marks all 4.8 releases incompatible
version = "#{major_version}.999"
else
- compiler = spec
+ name = spec
version = 9999
major_version = nil
end
- new(compiler, version, major_version, &block)
+ new(name, version, major_version, &block)
end
- def initialize(compiler, version, major_version, &block)
- @compiler = compiler
+ def initialize(name, version, major_version, &block)
+ @name = name
@version = version
@major_version = major_version
instance_eval(&block) if block_given?
diff --git a/Library/Homebrew/formula.rb b/Library/Homebrew/formula.rb
index 4961c7980..4c99de692 100644
--- a/Library/Homebrew/formula.rb
+++ b/Library/Homebrew/formula.rb
@@ -235,7 +235,7 @@ class Formula
(self.class.cc_failures || []).any? do |failure|
# Major version check distinguishes between, e.g.,
# GCC 4.7.1 and GCC 4.8.2, where a comparison is meaningless
- failure.compiler == cc.name && failure.major_version == cc.major_version &&
+ failure.name == cc.name && failure.major_version == cc.major_version &&
failure.version >= (cc.version || 0)
end
end