Clone this wiki locally
This content describes the constants that have been added in MacRuby.
CPU name of the architecture which MacRuby is ran.
>> Kernel::RUBY_ARCH => "x86_64"
>> Kernel::MACRUBY_VERSION => "0.12"
Following method may check whether running your program on MacRuby.
def is_macruby? begin MACRUBY_VERSION return true rescue return false end end
Git SHA1 Hash which indicates a last commit. (Older MacRuby shows a revision number of SVN)
>> Kernel::MACRUBY_REVISION => "git commit e35df75944e7a13d16f019e2ed1e4ce2406b06af"
Path of temporary directory.
>> Dir::NS_TMPDIR => "/var/folders/1z/ff7x15cj7vb24rl38ty0y52w0000gn/T/"