Put positive case first, drop redundant is_a? check

This commit is contained in:
Jack Nagel 2013-12-12 14:53:53 -06:00
parent a55f66839a
commit 1aadc83e70

View File

@ -39,11 +39,12 @@ class CompilerFailure
end
instance_eval(&block) if block_given?
if !compiler.is_a? Hash
@version = (@version || 9999).to_i
else
if compiler.is_a? Hash
# so fails_with :gcc => '4.8' simply marks all 4.8 releases incompatible
@version ||= @major_version + '.999' if compiler.is_a? Hash
@version ||= @major_version + '.999'
else
@version = (@version || 9999).to_i
end
end