On Sat, Jul 26, 2008 at 2:04 AM, Luis Lavena <luislavena / gmail.com> wrote:
--- snip ----

> Right now, besides query RUBY_PLATFORM, you also need:
>
> defined?(JRUBY_VERSION) or defined?(Rubinius) to deal with specfic
> code for those cases... (dunno about IronRuby).
>
> What about an unified way that doesn't pollute the already complicated
> RUBY_PLATFORM?
>

RUBY_ENGINE is needed to definitively identify the implementation on
which the code is running. This information needs to be simple and
unambiguous, not tacked onto some other information. When there was a
single implementation, this was not needed, but there are now multiple
implementations.

The RubySpec project needs this information and other code certainly
will. Whether folks use the value of RUBY_ENGINE in conditionals for
requiring code is up to them. They may have a good need to do so.

Also, the name is very clear and descriptive: engine, noun: a thing
that is the agent or instrument of a particular process. RUBY_ENGINE
== the thing that makes your Ruby code run.

Cheers,
Brian