Open artemshein opened 6 years ago
The only solution I found is:
def is_64bit_win?
ENV.has_key?('ProgramFiles(x86)')
end
Ugly, but works
Yeah that's a tricky one, since it's basically "os differs from runtime" and I never did figure out an awesome solution there. Maybe another method "OS.os_bits" LOL?
On Mon, Feb 19, 2018 at 11:14 AM, Artem Shein notifications@github.com wrote:
The only solution I found is:
def is_64bit_win? ENV.has_key?('ProgramFiles(x86)') end
Ugly, but works
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/rdp/os/issues/32#issuecomment-366769148, or mute the thread https://github.com/notifications/unsubscribe-auth/AAAw0PEPjwW4jPZEsEst3LJUbqO8poiKks5tWboRgaJpZM4SIafX .
pr welcome!
Same OS, different Rubies (64-bit and 32-bit): $ uname -a MINGW64_NT-10.0 name 2.5.0(0.295/5/3) 2016-03-31 18:47 x86_64 Msys $ ruby -e 'require "os";p RUBY_PLATFORM;p OS.bits' "x64-mingw32" 64 $ ruby -e 'require "os";p RUBY_PLATFORM;p OS.bits' "i386-mingw32" 32