Method: ChildProcess.os

Defined in:
lib/childprocess.rb

.osObject



105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
# File 'lib/childprocess.rb', line 105

def os
  @os ||= (
    require "rbconfig"
    host_os = RbConfig::CONFIG['host_os'].downcase

    case host_os
    when /linux/
      :linux
    when /darwin|mac os/
      :macosx
    when /mswin|msys|mingw32/
      :windows
    when /cygwin/
      :cygwin
    when /solaris|sunos/
      :solaris
    when /bsd|dragonfly/
      :bsd
    when /aix/
      :aix
    else
      raise Error, "unknown os: #{host_os.inspect}"
    end
  )
end