aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/compilers.rb
diff options
context:
space:
mode:
authorJack Nagel2013-12-12 14:53:53 -0600
committerJack Nagel2013-12-12 14:53:53 -0600
commit751c08e1f6bd63829c02db20ccd09227b6cbf594 (patch)
treed170901b129412fcea82bd307a5584e680b1da83 /Library/Homebrew/compilers.rb
parent09235c3d6e73d6a4a06dfe8c83928429855d197f (diff)
downloadhomebrew-751c08e1f6bd63829c02db20ccd09227b6cbf594.tar.bz2
Put positive case first, drop redundant is_a? check
Diffstat (limited to 'Library/Homebrew/compilers.rb')
-rw-r--r--Library/Homebrew/compilers.rb9
1 files changed, 5 insertions, 4 deletions
diff --git a/Library/Homebrew/compilers.rb b/Library/Homebrew/compilers.rb
index cb7d74334..bd3fde698 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