Don't pass nil to fails_with?
This commit is contained in:
parent
fded4d0385
commit
2fedd5b09a
@ -116,15 +116,10 @@ class CompilerSelector
|
|||||||
# Attempts to select an appropriate alternate compiler, but
|
# Attempts to select an appropriate alternate compiler, but
|
||||||
# if none can be found raises CompilerError instead
|
# if none can be found raises CompilerError instead
|
||||||
def compiler
|
def compiler
|
||||||
begin
|
while cc = @compilers.pop
|
||||||
cc = @compilers.pop
|
return cc.name unless @f.fails_with?(cc)
|
||||||
end while @f.fails_with?(cc)
|
|
||||||
|
|
||||||
if cc.nil?
|
|
||||||
raise CompilerSelectionError.new(@f)
|
|
||||||
else
|
|
||||||
cc.name
|
|
||||||
end
|
end
|
||||||
|
raise CompilerSelectionError.new(@f)
|
||||||
end
|
end
|
||||||
|
|
||||||
private
|
private
|
||||||
|
Loading…
x
Reference in New Issue
Block a user