Remove an is_a check
This commit is contained in:
parent
5b38e89107
commit
fded4d0385
@ -130,7 +130,13 @@ module SharedEnvExtension
|
|||||||
# an alternate compiler, altering the value of environment variables.
|
# an alternate compiler, altering the value of environment variables.
|
||||||
# If no valid compiler is found, raises an exception.
|
# If no valid compiler is found, raises an exception.
|
||||||
def validate_cc!(formula)
|
def validate_cc!(formula)
|
||||||
if formula.fails_with? compiler
|
# FIXME
|
||||||
|
# The compiler object we pass to fails_with? has no version information
|
||||||
|
# attached to it. This means that if we pass Compiler.new(:clang), the
|
||||||
|
# selector will be invoked if the formula fails with any version of clang.
|
||||||
|
# I think we can safely remove this conditional and always invoke the
|
||||||
|
# selector.
|
||||||
|
if formula.fails_with? Compiler.new(compiler)
|
||||||
send CompilerSelector.new(formula).compiler
|
send CompilerSelector.new(formula).compiler
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
@ -232,7 +232,6 @@ class Formula
|
|||||||
end
|
end
|
||||||
|
|
||||||
def fails_with? cc
|
def fails_with? cc
|
||||||
cc = Compiler.new(cc) unless cc.is_a? Compiler
|
|
||||||
(self.class.cc_failures || []).any? do |failure|
|
(self.class.cc_failures || []).any? do |failure|
|
||||||
# Major version check distinguishes between, e.g.,
|
# Major version check distinguishes between, e.g.,
|
||||||
# GCC 4.7.1 and GCC 4.8.2, where a comparison is meaningless
|
# GCC 4.7.1 and GCC 4.8.2, where a comparison is meaningless
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user