From: ptkwt@...1.aracnet.com (Phil Tomson) Date: 2001-11-28T14:30:25+09:00 Subject: [ruby-talk:26741] Re: quick question In article , Rich Kilmer wrote: >RUBY_PLATFORM does not give you the actual OS (nt, 98, etc), but the platform >that the Ruby distro was compiled to which on Win32 could be: > >mswin32 >mingw32 >cygwin > >There is not library call to get the actual OS itself. > >It should be easy to write though. > >-Rich Kilmer >Clifton, Virginia ;-) It hath been done. Check out my Win32 module at: http://www.aracnet.com/~ptkwt InWinNT? - returns true on Win[NT|2K] InWin98? (I should probably change the name to InWin9x?) - returns true on Win[95|98|ME] - at least I think it should work on ME as well) I have no idea what happens when you're running XP, I suspect that InWinNT? will return true. If you need even more info about the Windows OS running there is another function that will return a hash with several entries - I forget what I called it now, and I don't have it in front of me (its on a different machine) right now, so email me. Phil