From 1aadc83e706bb7cf8012a2632cea334396f93f83 Mon Sep 17 00:00:00 2001 From: Jack Nagel Date: Thu, 12 Dec 2013 14:53:53 -0600 Subject: [PATCH] Put positive case first, drop redundant is_a? check --- Library/Homebrew/compilers.rb | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/Library/Homebrew/compilers.rb b/Library/Homebrew/compilers.rb index cb7d74334e..bd3fde6989 100644 --- a/Library/Homebrew/compilers.rb +++ b/Library/Homebrew/compilers.rb @@ -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