Method: ChildProcess.arch

Defined in:
lib/childprocess.rb

.archObject



113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
# File 'lib/childprocess.rb', line 113

def arch
  @arch ||= (
    host_cpu = RbConfig::CONFIG['host_cpu'].downcase
    case host_cpu
    when /i[3456]86/
      # Darwin always reports i686, even when running in 64bit mod
      if os == :macosx && 0xfee1deadbeef.is_a?(Fixnum)
        "x86_64"
      else
        "i386"
      end
    when /amd64|x86_64/
      "x86_64"
    when /ppc|powerpc/
      "powerpc"
    else
      host_cpu
    end
  )
end