From: Rob Biedenharn Date: 2009-02-03T22:31:17+09:00 Subject: Re: How to tell if one is running 32 or 64 bit Ruby on Mac O On Feb 3, 2009, at 7:07 AM, hengist podd wrote: > Wes Gamble wrote: >> All, >> >> A friend just bought a new Mac and is trying to figure out whether >> they >> have 32 or 64 bit Ruby installed. This is the output of "file `which >> ruby`": >> >> /usr/bin/ruby: Mach-O universal binary with 2 architectures >> /usr/bin/ruby (for architecture ppc7400): Mach-O executable ppc >> /usr/bin/ruby (for architecture i386): Mach-O executable i386 >> >> Can't really tell from this. Does anyone know definitively if Mac >> OS X >> is still shipping with a 32 - bit version of Ruby or if there is a >> way >> to check? > > The stock Ruby 1.8.6 installation on 10.5 consists of a 4-way fat > (ppc + > ppc64 + i386 + x86_64) framework build which you'll find in > /System/Library/Frameworks, with a 32-bit fat command line interpreter > symlinked to /usr/bin/ruby. This means Ruby will run as 32-bit in 32- > bit > processes (e.g. when running scripts via /usr/bin/ruby) and as 64- > bit in > 64-bit processes. > > HTH > > has > -- > Control AppleScriptable applications from Python, Ruby and ObjC: > http://appscript.sourceforge.net > > -- This came up at least once before so a search of the archive may yield a better answer, but one possible way is to see how big a Fixnum is in bytes: $ ruby -v ruby 1.8.6 (2008-03-03 patchlevel 114) [universal-darwin9.0] $ ruby -e "puts 1.size" 4 -Rob Rob Biedenharn http://agileconsultingllc.com Rob@AgileConsultingLLC.com