diff --git a/Library/Homebrew/cmd/doctor.rb b/Library/Homebrew/cmd/doctor.rb index 69d8039ad6..059e6f2840 100644 --- a/Library/Homebrew/cmd/doctor.rb +++ b/Library/Homebrew/cmd/doctor.rb @@ -193,7 +193,7 @@ end def check_xcode_clt if MacOS::Xcode.installed? __check_xcode_up_to_date - elsif MacOS.version >= 10.7 + elsif MacOS.version >= "10.7" __check_clt_up_to_date else <<-EOS.undent Xcode not installed @@ -225,7 +225,7 @@ def __check_clt_up_to_date end def check_for_osx_gcc_installer - if (MacOS.version < 10.7 || MacOS::Xcode.version < "4.1") && \ + if (MacOS.version < "10.7" || MacOS::Xcode.version < "4.1") && \ MacOS.clang_version == "2.1" then <<-EOS.undent You have osx-gcc-installer installed. Homebrew doesn't support osx-gcc-installer, and it is known to cause diff --git a/Library/Homebrew/compat/macos.rb b/Library/Homebrew/compat/macos.rb index 636807d484..d097a59459 100644 --- a/Library/Homebrew/compat/macos.rb +++ b/Library/Homebrew/compat/macos.rb @@ -33,21 +33,21 @@ module OS end def leopard? - version == 10.5 + version == "10.5" end def snow_leopard? - version >= 10.6 + version >= "10.6" end alias_method :snow_leopard_or_newer?, :snow_leopard? def lion? - version >= 10.7 + version >= "10.7" end alias_method :lion_or_newer?, :lion? def mountain_lion? - version >= 10.8 + version >= "10.8" end alias_method :mountain_lion_or_newer?, :mountain_lion? diff --git a/Library/Homebrew/os/mac/xcode.rb b/Library/Homebrew/os/mac/xcode.rb index 6820aa53a5..0a4a9a8fbc 100644 --- a/Library/Homebrew/os/mac/xcode.rb +++ b/Library/Homebrew/os/mac/xcode.rb @@ -30,7 +30,7 @@ module OS when "10.9" then "5.0.1" else # Default to newest known version of Xcode for unreleased OSX versions. - if MacOS.version > 10.9 + if MacOS.version > "10.9" "5.0.1" else raise "Mac OS X '#{MacOS.version}' is invalid" diff --git a/Library/Homebrew/utils.rb b/Library/Homebrew/utils.rb index ca9aad542f..f3ac5e447c 100644 --- a/Library/Homebrew/utils.rb +++ b/Library/Homebrew/utils.rb @@ -138,7 +138,7 @@ def curl *args args = [HOMEBREW_CURL_ARGS, HOMEBREW_USER_AGENT, *args] # See https://github.com/mxcl/homebrew/issues/6103 - args << "--insecure" if MacOS.version < 10.6 + args << "--insecure" if MacOS.version < "10.6" args << "--verbose" if ENV['HOMEBREW_CURL_VERBOSE'] args << "--silent" unless $stdout.tty? diff --git a/Library/brew.rb b/Library/brew.rb index b72d61494f..0c1aef8126 100755 --- a/Library/brew.rb +++ b/Library/brew.rb @@ -35,7 +35,7 @@ case HOMEBREW_PREFIX.to_s when '/', '/usr' # it may work, but I only see pain this route and don't want to support it abort "Cowardly refusing to continue at this prefix: #{HOMEBREW_PREFIX}" end -if OS.mac? and MacOS.version < 10.5 +if OS.mac? and MacOS.version < "10.5" abort <<-EOABORT.undent Homebrew requires Leopard or higher. For Tiger support, see: https://github.com/mistydemeo/tigerbrew