From: Ken Allen Date: 2006-12-04T04:35:17+09:00 Subject: Re: How to get operating system type info Dao Shi wrote: > Hi Guys, > > I'm writing a software building script in Ruby for Unix and Windows. > > I want to know the type of the platform that my script is running on - > whether it's Windows, Linux or MacOSX. I need to do something special > for different os. > > Is there any way to get this without hacking by myself? Google gave me > nothing useful. > > Thanks, > D > > The RUBY_PLATFORM constant is what you want. irb(main):001:0> RUBY_PLATFORM => "i386-mswin32" Ken