Daniel Berger
5/16/2006 6:54:00 PM
J wrote:
> Hello,
>
> What is the easiest way to detect what operating system your running in
> a ruby script? I have a script that needs to run on several versions of
> linux and on windows. The code executed is different depending on which
> machine I'm on. What is the best way to do this?
>
> Janak
Use RUBY_PLATFORM for a simple platform string.
If you need more advanced information, take a look at sys-uname,
available on the RAA.
Regards,
Dan