1
0
Fork 0
mirror of https://github.com/rubyjs/libv8 synced 2023-03-27 23:21:48 -04:00

Make arch detection more readable

This commit is contained in:
ignisf 2013-02-28 02:01:30 +02:00
parent 7d8fecb349
commit dc02cd734f

View file

@ -20,6 +20,7 @@ module Libv8
Object.const_defined?(:RUBY_ENGINE) && RUBY_ENGINE == "rbx"
end
# TODO fix false positive on 64-bit ARM
def x64?
if rubinius?
x86_64_from_build_cpu || x86_64_from_arch_flag
@ -33,7 +34,10 @@ module Libv8
end
def libv8_arch
x64? ? "x64" : arm? ? "arm" : "ia32"
if x64? then "x64"
elsif arm? then "arm"
else "ia32"
end
end
end
end