diff options
| author | Adam Vandenberg | 2011-03-18 10:30:26 -0700 |
|---|---|---|
| committer | Adam Vandenberg | 2011-03-18 10:30:26 -0700 |
| commit | edeace562e45802525e5699ea73465380cb9e8c3 (patch) | |
| tree | 41d82ed839796af55c31088c0d7cd84ce48f676c | |
| parent | 4c64c9107b2f56e17d87d749bba3feedd5ec2800 (diff) | |
| download | homebrew-edeace562e45802525e5699ea73465380cb9e8c3.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 #4710
| -rw-r--r-- | Library/Homebrew/compatibility.rb | 5 | ||||
| -rw-r--r-- | Library/Homebrew/hardware.rb | 4 | ||||
| -rw-r--r-- | Library/Homebrew/utils.rb | 4 |
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 |
