aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
authorAdam Vandenberg2011-03-18 10:30:26 -0700
committerAdam Vandenberg2011-03-18 10:30:26 -0700
commitd8c2642b6d4892d139083147b0b91da734fd1a0f (patch)
treeda56fbb21896f94a8cfd360fa32ff0d73f6cca6e /Library
parent22afb1cc43b9999afb77d9d9d221d00683b6f116 (diff)
downloadbrew-d8c2642b6d4892d139083147b0b91da734fd1a0f.tar.bz2
Add MacOS.prefer_64_bit?
Moved snow_leopard_64? to compatibility and replaced it with a function MacOS.prefer_64_bit?. This method is in a better place and has a better name once Lion comes out. Fixes Homebrew/homebrew#4710
Diffstat (limited to 'Library')
-rw-r--r--Library/Homebrew/compatibility.rb5
-rw-r--r--Library/Homebrew/hardware.rb4
-rw-r--r--Library/Homebrew/utils.rb4
3 files changed, 9 insertions, 4 deletions
diff --git a/Library/Homebrew/compatibility.rb b/Library/Homebrew/compatibility.rb
index 70a55f1ae..8e1a028de 100644
--- a/Library/Homebrew/compatibility.rb
+++ b/Library/Homebrew/compatibility.rb
@@ -1,3 +1,4 @@
+## Compatibility layer introduced in 0.8 (refactor)
# maybe never used by anyone, but alas it must continue to exist
def versions_of(keg_name)
@@ -50,6 +51,10 @@ def search_brews text
Homebrew.search_brews text
end
+def snow_leopard_64?
+ MacOS.prefer_64_bit?
+end
+
class Formula
# in compatability because the naming is somewhat confusing
def self.resolve_alias name
diff --git a/Library/Homebrew/hardware.rb b/Library/Homebrew/hardware.rb
index 4c7924372..3d76a74db 100644
--- a/Library/Homebrew/hardware.rb
+++ b/Library/Homebrew/hardware.rb
@@ -69,7 +69,3 @@ protected
$?.success? && result == 1 # sysctl call succeded and printed 1
end
end
-
-def snow_leopard_64?
- MACOS_VERSION >= 10.6 and Hardware.is_64_bit?
-end
diff --git a/Library/Homebrew/utils.rb b/Library/Homebrew/utils.rb
index bd33f8640..5b4348080 100644
--- a/Library/Homebrew/utils.rb
+++ b/Library/Homebrew/utils.rb
@@ -301,6 +301,10 @@ module MacOS extend self
false
end
+
+ def prefer_64_bit?
+ MACOS_VERSION >= 10.6 and Hardware.is_64_bit?
+ end
end
module GitHub extend self