From: Daniel Berger Date: 2009-01-11T12:17:30+09:00 Subject: Re: Unique identify computer (both Windows and MacOSX) On Jan 10, 4:04 pm, Jarmo Pertman wrote: > puts RUBY_PLATFORM > > Fernando Malard wrote: > > Hello, > > > How can I unique identify the OS where my Ruby code is running? > > > I can do this using specific Win32 features but I looking for an OS > > independent approach...maybe using the HD serial? > > > Regards, > > Fernando. No, don't use RUBY_PLATFORM because it won't work with JRuby, and possibly other implementations. Instead, require "rbconfig", then check Config::CONFIG['host_os']. Regards, Dan