From: The Higgs bozo Date: 2008-10-15T04:55:52+09:00 Subject: Re: Get system name Daniel Berger wrote: > On Oct 14, 12:03�pm, The Higgs bozo wrote: >> Victor Goff wrote: >> > Check out the Ruby Constants... PLATFORM could be one. >> >> The constant is RUBY_PLATFORM. > > I recommend against this because of JRuby (and probably IronRuby). > JRuby, for example, will return "java" for RUBY_PLATFORM. > >> If more info is needed, check the output of this, >> >> require 'rbconfig' >> require 'pp' >> pp Config::CONFIG > > There you go. Take a look at Config['host_os']. I wonder if RUBY_PLATFORM should be deprecated, then? I've used 'target_os' in the past, a decision I rationalized thusly: on the off chance that ruby spits out an executable of any form, I want the platform of that executable. In hindsight I wonder if it makes any sense. Is there an example of CONFIG["target_os"] != CONFIG["host_os"] ? -- Posted via http://www.ruby-forum.com/.