aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/compilers.rb
diff options
context:
space:
mode:
authorMike McQuaid2016-09-17 15:17:27 +0100
committerMike McQuaid2016-09-17 16:14:13 +0100
commit6693915399a5d9f1f09255c5008d2cc1209f7662 (patch)
treea4cf8f1f273ebf5679c418fbf896cf320a84ef76 /Library/Homebrew/compilers.rb
parent299dffd903182bd4ab65828ae2347d415de7b259 (diff)
downloadbrew-6693915399a5d9f1f09255c5008d2cc1209f7662.tar.bz2
rubocop --auto-correct all remaining files.
But remove some manual `.freeze`s on constants that shouldn't be constants.
Diffstat (limited to 'Library/Homebrew/compilers.rb')
-rw-r--r--Library/Homebrew/compilers.rb10
1 files changed, 5 insertions, 5 deletions
diff --git a/Library/Homebrew/compilers.rb b/Library/Homebrew/compilers.rb
index b8bc708fa..7f0e16d78 100644
--- a/Library/Homebrew/compilers.rb
+++ b/Library/Homebrew/compilers.rb
@@ -1,12 +1,12 @@
# @private
module CompilerConstants
- GNU_GCC_VERSIONS = %w[4.3 4.4 4.5 4.6 4.7 4.8 4.9 5 6 7]
+ GNU_GCC_VERSIONS = %w[4.3 4.4 4.5 4.6 4.7 4.8 4.9 5 6 7].freeze
GNU_GCC_REGEXP = /^gcc-(4\.[3-9]|[5-7])$/
COMPILER_SYMBOL_MAP = {
"gcc-4.0" => :gcc_4_0,
"gcc-4.2" => :gcc,
"clang" => :clang,
- }
+ }.freeze
COMPILERS = COMPILER_SYMBOL_MAP.values +
GNU_GCC_VERSIONS.map { |n| "gcc-#{n}" }
@@ -70,7 +70,7 @@ class CompilerFailure
:openmp => [
create(:clang),
],
- }
+ }.freeze
end
class CompilerSelector
@@ -82,7 +82,7 @@ class CompilerSelector
:clang => [:clang, :gcc, :gnu, :gcc_4_0],
:gcc => [:gcc, :gnu, :clang, :gcc_4_0],
:gcc_4_0 => [:gcc_4_0, :gcc, :gnu, :clang],
- }
+ }.freeze
def self.select_for(formula, compilers = self.compilers)
new(formula, DevelopmentTools, compilers).compiler
@@ -103,7 +103,7 @@ class CompilerSelector
def compiler
find_compiler { |c| return c.name unless fails_with?(c) }
- raise CompilerSelectionError.new(formula)
+ raise CompilerSelectionError, formula
end
private