diff options
| author | Ben Alpert | 2009-09-18 12:50:01 -0600 |
|---|---|---|
| committer | Ben Alpert | 2009-09-24 16:30:26 -0600 |
| commit | e339a2a73ffa0e8e5a8d63ca49089a24ec2835e9 (patch) | |
| tree | 0d661ff58738d4d478c202c033855df3204ad31d /Library | |
| parent | bab6515668a0e7fd34bea13c5dcc14c46a548562 (diff) | |
| download | brew-e339a2a73ffa0e8e5a8d63ca49089a24ec2835e9.tar.bz2 | |
Add Hardware.is_64_bit? method
Closes Homebrew/homebrew#53
Diffstat (limited to 'Library')
| -rw-r--r-- | Library/Homebrew/hardware.rb | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/Library/Homebrew/hardware.rb b/Library/Homebrew/hardware.rb index 3059f0875..18d4e6665 100644 --- a/Library/Homebrew/hardware.rb +++ b/Library/Homebrew/hardware.rb @@ -60,6 +60,10 @@ class Hardware @@processor_count ||= `/usr/sbin/sysctl -n hw.ncpu`.to_i end + def self.is_64_bit? + self.sysctl_bool("hw.cpu64bit_capable") + end + protected def self.sysctl_bool(property) result = nil |
