From e2c9e6d3c273cb8efcbdf655ece802e6e71b9a0c Mon Sep 17 00:00:00 2001 From: Markus Reiter Date: Wed, 19 Aug 2020 07:35:50 +0200 Subject: [PATCH] Refactor and document `SystemConfig`. --- Library/Homebrew/extend/os/linux/system_config.rb | 2 +- Library/Homebrew/extend/os/mac/system_config.rb | 2 +- Library/Homebrew/system_config.rb | 5 ++++- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/Library/Homebrew/extend/os/linux/system_config.rb b/Library/Homebrew/extend/os/linux/system_config.rb index 93e87d3119..6916d3d129 100644 --- a/Library/Homebrew/extend/os/linux/system_config.rb +++ b/Library/Homebrew/extend/os/linux/system_config.rb @@ -3,7 +3,7 @@ require "formula" require "os/linux/glibc" -class SystemConfig +module SystemConfig class << self def host_glibc_version version = OS::Linux::Glibc.system_version diff --git a/Library/Homebrew/extend/os/mac/system_config.rb b/Library/Homebrew/extend/os/mac/system_config.rb index 5bca79689d..da6698fc53 100644 --- a/Library/Homebrew/extend/os/mac/system_config.rb +++ b/Library/Homebrew/extend/os/mac/system_config.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -class SystemConfig +module SystemConfig class << self undef describe_java, describe_homebrew_ruby diff --git a/Library/Homebrew/system_config.rb b/Library/Homebrew/system_config.rb index fd65dc07aa..1b81c7b25c 100644 --- a/Library/Homebrew/system_config.rb +++ b/Library/Homebrew/system_config.rb @@ -5,7 +5,10 @@ require "software_spec" require "development_tools" require "extend/ENV" -class SystemConfig +# Helper module for querying information about the system configuration. +# +# @api private +module SystemConfig class << self def clang @clang ||= if DevelopmentTools.installed?