linux: Add ARM to CPU.type

This commit is contained in:
Shaun Jackman 2017-03-10 10:20:30 -08:00
parent b38c52f930
commit c6cbf9590d

View File

@ -12,6 +12,8 @@ module Hardware
def type
@type ||= if cpuinfo =~ /Intel|AMD/
:intel
elsif cpuinfo =~ /ARM|Marvell/
:arm
else
:dunno
end
@ -71,7 +73,7 @@ module Hardware
end
def flags
@flags ||= cpuinfo[/^flags.*/, 0].split
@flags ||= cpuinfo[/^(flags|Features).*/, 0].split
end
# Compatibility with Mac method, which returns lowercase symbols