From 13d544e11e92ba8ea3788723432046f8dfe4adf9 Mon Sep 17 00:00:00 2001 From: BrewTestBot Date: Mon, 3 Aug 2015 13:09:07 +0100 Subject: Core files style updates. Closes Homebrew/homebrew#42354. Signed-off-by: Mike McQuaid --- Library/Homebrew/compilers.rb | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'Library/Homebrew/compilers.rb') diff --git a/Library/Homebrew/compilers.rb b/Library/Homebrew/compilers.rb index a8bc945c2..4ed8c7f00 100644 --- a/Library/Homebrew/compilers.rb +++ b/Library/Homebrew/compilers.rb @@ -5,11 +5,11 @@ module CompilerConstants "gcc-4.0" => :gcc_4_0, "gcc-4.2" => :gcc, "llvm-gcc" => :llvm, - "clang" => :clang, + "clang" => :clang } COMPILERS = COMPILER_SYMBOL_MAP.values + - GNU_GCC_VERSIONS.map { |n| "gcc-#{n}" } + GNU_GCC_VERSIONS.map { |n| "gcc-#{n}" } end class CompilerFailure @@ -23,7 +23,7 @@ class CompilerFailure # The cause is no longer used so we need not hold a reference to the string def cause(_); end - def self.for_standard standard + def self.for_standard(standard) COLLECTIONS.fetch(standard) do raise ArgumentError, "\"#{standard}\" is not a recognized standard" end @@ -66,12 +66,12 @@ class CompilerFailure create(:gcc => "4.3"), create(:gcc => "4.4"), create(:gcc => "4.5"), - create(:gcc => "4.6"), + create(:gcc => "4.6") ], :openmp => [ create(:clang), - create(:llvm), - ], + create(:llvm) + ] } end @@ -84,10 +84,10 @@ class CompilerSelector :clang => [:clang, :gcc, :llvm, :gnu, :gcc_4_0], :gcc => [:gcc, :llvm, :gnu, :clang, :gcc_4_0], :llvm => [:llvm, :gcc, :gnu, :clang, :gcc_4_0], - :gcc_4_0 => [:gcc_4_0, :gcc, :llvm, :gnu, :clang], + :gcc_4_0 => [:gcc_4_0, :gcc, :llvm, :gnu, :clang] } - def self.select_for(formula, compilers=self.compilers) + def self.select_for(formula, compilers = self.compilers) new(formula, MacOS, compilers).compiler end -- cgit v1.2.3