From: Marc Heiler Date: 2007-11-27T03:26:47+09:00 Subject: Re: one-liner for checking platform? Use the constant RUBY_PLATFORM On my platform it is # => "i686-linux" on windows, its different on apple i guess too :) if you dont need a one liner you can use this def which_platform? $RUBY_PLATFORM ||= case RUBY_PLATFORM.downcase when /linux|bsd|solaris|hpux|powerpc-darwin/ :unix when /mswin32|mingw32|bccwin32/ :windows when /cygwin/ :cygwin when /java/ :java else :other end end -- Posted via http://www.ruby-forum.com/.