RUBY_PLATFORM
is java
either way.
Normally I can do system checks with uname
but Windows doesn't have uname
command. (and checking that uname
didn't run correctly is pretty silly)
RUBY_PLATFORM
is java
either way.
Normally I can do system checks with uname
but Windows doesn't have uname
command. (and checking that uname
didn't run correctly is pretty silly)
In addition, if you need underlying architecture, you can check RUBY_DESCRIPTION
, and look between [
and ]
.
irb(main):004:0> RUBY_DESCRIPTION
=> "jruby 1.7.0.dev (ruby-1.9.3-p139) (2012-03-30 387d8ad) (Java HotSpot(TM) 64-Bit Server VM 1.6.0_29) [darwin-x86_64-java]"