aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
authorMike McQuaid2016-07-26 20:30:30 -0600
committerMike McQuaid2016-07-27 15:05:42 -0600
commit3318967609952420980e1f87f2c6a5eac061065f (patch)
tree93463445771de414cc902b7994a039da519e9544 /Library
parent932e145d9c44ef6c9f828422bf1daef8f10baa6f (diff)
downloadbrew-3318967609952420980e1f87f2c6a5eac061065f.tar.bz2
os: fix Rubocop warnings.
Diffstat (limited to 'Library')
-rw-r--r--Library/Homebrew/os.rb17
1 files changed, 9 insertions, 8 deletions
diff --git a/Library/Homebrew/os.rb b/Library/Homebrew/os.rb
index 63c86b7f4..4500fbd1e 100644
--- a/Library/Homebrew/os.rb
+++ b/Library/Homebrew/os.rb
@@ -1,23 +1,24 @@
module OS
def self.mac?
- /darwin/i === RUBY_PLATFORM && !ENV["HOMEBREW_TEST_GENERIC_OS"]
+ return false if ENV["HOMEBREW_TEST_GENERIC_OS"]
+ RUBY_PLATFORM.to_s.downcase.include? "darwin"
end
def self.linux?
- /linux/i === RUBY_PLATFORM
+ RUBY_PLATFORM.to_s.downcase.include? "linux"
end
::OS_VERSION = ENV["HOMEBREW_OS_VERSION"]
if OS.mac?
require "os/mac"
- ISSUES_URL = "https://git.io/brew-troubleshooting"
- PATH_OPEN = "/usr/bin/open"
+ ISSUES_URL = "https://git.io/brew-troubleshooting".freeze
+ PATH_OPEN = "/usr/bin/open".freeze
# compatibility
- ::MACOS_FULL_VERSION = OS::Mac.full_version.to_s
- ::MACOS_VERSION = OS::Mac.version.to_s
+ ::MACOS_FULL_VERSION = OS::Mac.full_version.to_s.freeze
+ ::MACOS_VERSION = OS::Mac.version.to_s.freeze
elsif OS.linux?
- ISSUES_URL = "https://github.com/Homebrew/linuxbrew/wiki/troubleshooting"
- PATH_OPEN = "xdg-open"
+ ISSUES_URL = "https://github.com/Homebrew/linuxbrew/wiki/troubleshooting".freeze
+ PATH_OPEN = "xdg-open".freeze
end
end