[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

Newbie ruby question (finding OS

Paul Johnston

1/18/2006 8:33:00 AM

Hi
Just started looking at ruby and have a question
Is there a simple way to get an idea of what operating system a ruby
program is running on.
I was guessing checking the OS's file system using something like
"executable?" or even "system" and running a specific *nix command
and seeing what happens but these seem rather crude.
Any suggestions ?
TIA
Paul
2 Answers

Dave Burt

1/18/2006 9:20:00 AM

0

Paul Johnston wrote:
> Is there a simple way to get an idea of what operating system a ruby
> program is running on.

Use the RUBY_PLATFORM constant.

Cheers,
Dave


Paul Johnston

1/18/2006 9:49:00 AM

0

On Wed, 18 Jan 2006 09:20:04 GMT, "Dave Burt" <dave@burt.id.au> wrote:

>Paul Johnston wrote:
>> Is there a simple way to get an idea of what operating system a ruby
>> program is running on.
>
>Use the RUBY_PLATFORM constant.
>
>Cheers,
>Dave
>

Many thanks
Paul