From: Daniel Berger Date: 2005-01-26T04:45:49+09:00 Subject: Re: In need of Win32 fcntl (non-blocking) Ivo Palli wrote: > Are there any ways to detect the OS btw? If I'm going to run my script > on multiple platforms, and I need to workaround, how can I do this > automatically? > > Regards, > > Ivo Palli If you just need to detect Windows vs Unix, you can use File::ALT_SEPARATOR. It's only true on Win32. If you want a little more detail, you can use the RUBY_VERSION constant. If you want a lot more detail, see sys-uname, available on the RAA. Regards, Dan