Group: comp.lang.ruby
From: unbewusst.sein@weltanschauung.com.invalid (=?ISO-8859-1?Q?Une_B=E9v?= =?ISO-8859-1?Q?ue?=)
Date: Thursday, November 29, 2007 9:39 AM
Subject: how to know the platform ?


because i have some part of a script only running on MacOS X ony i'd
like to know how to detect the platform from a ruby script.

as in java we have :
public static String OS_NAME = System.getProperty("os.name");
public static String OS_VERSION = System.getProperty("os.version");

ENV hash doen't contains any info like that.

I've found : RUBY_PLATFORM giving :
RUBY_PLATFORM = powerpc-darwin8.9.0


--
Une Bévue