From: Roger Pack Date: 2009-05-29T21:30:24+09:00 Subject: [ruby-core:23619] Re: Meaning of RUBY_PLATFORM > 1) The guy who wrote the gem fell into the trap of assuming that > RUBY_PLATFORM gives information about the runtime environment rather > than the environment at the time that the ruby executable was > configured/compiled. Perhaps now is a good time to bring up a thought on adding some more constants (sorry if this is a repost).. Currently it is "hard" to know what OS you're on by regex'ing RUBY_PLATFORM you can't do RUBY_PLATFORM =~ /win/ since it would match darwin, so in general it causes confusion (and bugs) among gem developers. That being said, they aren't "huge" bugs and only gem developers who care about windows have to target them, but it's still...not easy. My own wish would be that there was some way easier to discover platform. One way might be RUBY_OS -> ['linux', 'aix', 'win32', 'win64' etc.] Gem::Platform.local seems to almost get us there... # but not quite. Maybe I should submit a patch to gems like Gem::Platform.local.os -> ['windows'] etc. Somewhat unrelated is that currently you can't tell from within ruby what compiler version created it. A way to overcome this might be something like COMPILER and COMPILER_VERSION ex: >> Rubinius::COMPILER => :gcc >> Rubinius::COMPILER_VERSION => "4.0.1 (Apple Inc. build 5490)" Thoughts on either of those? Thank you -=r