From: Mark S Bilk Date: 2009-04-08T21:30:05+09:00 Subject: Re: How to find Operating system On Apr 8, 4:27 am, Eleanor McHugh wrote: > Or you can use rbconfig: > >    require 'rbconfig' >    case Config::CONFIG['host_os'] >    when /darwin/i >      puts "Ah, Darwin :)" >    when /mswin|windows/i >      raise "You call that an operating system?" >    else >      raise "I haven't the foggiest" >    end Thanks, Eleanor! If I may suggest an additional clause (with meaning in both the individual and group sense): require 'rbconfig' case Config::CONFIG['host_os'] when /darwin/i puts "Ah, Darwin :)" when /linux-gnu/i puts "GNU/Linux - The World Community expands Consciousness" when /mswin|windows/i raise "You call that an operating system?" else raise "I haven't the foggiest" end