Merge pull request #2951 from bfontaine/s/ruby_platform/rbconfig
OS: use RbConfig instead of RUBY_PLATFORM
This commit is contained in:
commit
0b78a7f884
@ -1,12 +1,14 @@
|
|||||||
|
require "rbconfig"
|
||||||
|
|
||||||
module OS
|
module OS
|
||||||
def self.mac?
|
def self.mac?
|
||||||
return false if ENV["HOMEBREW_TEST_GENERIC_OS"]
|
return false if ENV["HOMEBREW_TEST_GENERIC_OS"]
|
||||||
RUBY_PLATFORM.to_s.downcase.include? "darwin"
|
RbConfig::CONFIG["host_os"].include? "darwin"
|
||||||
end
|
end
|
||||||
|
|
||||||
def self.linux?
|
def self.linux?
|
||||||
return false if ENV["HOMEBREW_TEST_GENERIC_OS"]
|
return false if ENV["HOMEBREW_TEST_GENERIC_OS"]
|
||||||
RUBY_PLATFORM.to_s.downcase.include? "linux"
|
RbConfig::CONFIG["host_os"].include? "linux"
|
||||||
end
|
end
|
||||||
|
|
||||||
::OS_VERSION = ENV["HOMEBREW_OS_VERSION"]
|
::OS_VERSION = ENV["HOMEBREW_OS_VERSION"]
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user