diff options
| author | Jack Nagel | 2013-02-10 20:59:44 -0600 | 
|---|---|---|
| committer | Jack Nagel | 2013-02-10 21:02:27 -0600 | 
| commit | 1c5bf16bb1cf3f7fa4e773504360d0fa798af2c1 (patch) | |
| tree | c202fc75f8c6a1b8960da5a8a242f7d7b57dfbc9 /Library/Homebrew/macos.rb | |
| parent | c11a1f420d81ef449613dbf71dbb270875c633a2 (diff) | |
| download | homebrew-1c5bf16bb1cf3f7fa4e773504360d0fa798af2c1.tar.bz2 | |
Don't reinvent IndexError here
Diffstat (limited to 'Library/Homebrew/macos.rb')
| -rw-r--r-- | Library/Homebrew/macos.rb | 25 | 
1 files changed, 10 insertions, 15 deletions
diff --git a/Library/Homebrew/macos.rb b/Library/Homebrew/macos.rb index c33be688c..c01b30981 100644 --- a/Library/Homebrew/macos.rb +++ b/Library/Homebrew/macos.rb @@ -206,23 +206,18 @@ module MacOS extend self    }    def compilers_standard? -    xcode = Xcode.version - -    unless STANDARD_COMPILERS.keys.include? xcode -      onoe <<-EOS.undent -        Homebrew doesn't know what compiler versions ship with your version of -        Xcode. Please `brew update` and if that doesn't help, file an issue with -        the output of `brew --config`: -          https://github.com/mxcl/homebrew/issues - -        Thanks! -        EOS -      return -    end - -    STANDARD_COMPILERS[xcode].all? do |method, build| +    STANDARD_COMPILERS.fetch(Xcode.version.to_s).all? do |method, build|        MacOS.send(:"#{method}_version") == build      end +  rescue IndexError +    onoe <<-EOS.undent +      Homebrew doesn't know what compiler versions ship with your version +      of Xcode (#{Xcode.version}). Please `brew update` and if that doesn't help, file +      an issue with the output of `brew --config`: +        https://github.com/mxcl/homebrew/issues + +      Thanks! +    EOS    end    def app_with_bundle_id id  | 
