The current environment is provided by the global constant RUBY_PLATFORM
ruby called in cygwin bash shell (/ usr / bin / ruby):
puts RUBY_PLATFORM i386-cygwin
ruby is invoked on the command line (c: \ Ruby193 \ bin \ ruby.exe):
puts RUBY_PLATFORM i386-mingw32
puts ENV['OS'] for both of the above environment properties: Windows_NT
nick1176
source share