aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
authorJack Nagel2013-10-22 20:47:37 -0500
committerJack Nagel2013-10-22 20:47:37 -0500
commitdf824a22a764538ab4a54f186a761d7fff90f7fd (patch)
tree5f62bdbcab3a16b8d6d7ec6bd4e1d295a5835a36 /Library
parent6030695bee5e62174c4895754e7f9ebf5613cae5 (diff)
downloadbrew-df824a22a764538ab4a54f186a761d7fff90f7fd.tar.bz2
Avoid comparing MacOS.version to floats
Diffstat (limited to 'Library')
-rw-r--r--Library/Homebrew/cmd/doctor.rb4
-rw-r--r--Library/Homebrew/compat/macos.rb8
-rw-r--r--Library/Homebrew/os/mac/xcode.rb2
-rw-r--r--Library/Homebrew/utils.rb2
-rwxr-xr-xLibrary/brew.rb2
5 files changed, 9 insertions, 9 deletions
diff --git a/Library/Homebrew/cmd/doctor.rb b/Library/Homebrew/cmd/doctor.rb
index 69d8039ad..059e6f284 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 636807d48..d097a5945 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 6820aa53a..0a4a9a8fb 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 ca9aad542..f3ac5e447 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 b72d61494..0c1aef812 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