aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
authorJack Nagel2015-02-26 23:22:23 -0500
committerJack Nagel2015-02-27 20:38:01 -0500
commit4060f8377cd031eb6e32f0ce5cced7e1a33a7927 (patch)
treebeb42f4a88f6a0f6768fb9c3bfccef96b48a1b02 /Library
parent8028d48f0b75162cfe4a9d54b46d937f8d70bba8 (diff)
downloadhomebrew-4060f8377cd031eb6e32f0ce5cced7e1a33a7927.tar.bz2
Include more features in Hardware::CPU.features
Diffstat (limited to 'Library')
-rw-r--r--Library/Homebrew/os/mac/hardware.rb14
1 files changed, 8 insertions, 6 deletions
diff --git a/Library/Homebrew/os/mac/hardware.rb b/Library/Homebrew/os/mac/hardware.rb
index 17e9ca65b..1113451f3 100644
--- a/Library/Homebrew/os/mac/hardware.rb
+++ b/Library/Homebrew/os/mac/hardware.rb
@@ -98,9 +98,11 @@ module MacCPUs
end
def features
- @features ||= sysctl_n("machdep.cpu.features").split(" ").map do |s|
- s.downcase.intern
- end
+ @features ||= sysctl_n(
+ "machdep.cpu.features",
+ "machdep.cpu.extfeatures",
+ "machdep.cpu.leaf7_features"
+ ).split(" ").map { |s| s.downcase.to_sym }
end
def aes?
@@ -145,9 +147,9 @@ module MacCPUs
sysctl_n(key).to_i
end
- def sysctl_n(key)
- (@properties ||= {}).fetch(key) do
- @properties[key] = Utils.popen_read("/usr/sbin/sysctl", "-n", key)
+ def sysctl_n(*keys)
+ (@properties ||= {}).fetch(keys) do
+ @properties[keys] = Utils.popen_read("/usr/sbin/sysctl", "-n", *keys)
end
end
end