Hi,

On Fri, Jul 25, 2008 at 4:35 AM, Tanaka Akira <akr / fsij.org> wrote:
> What the usage of RUBY_ENGINE?

1. RubyGems uses it to invoke #{RUBY_ENGINE}.rb file with
customizations, specific for particular implementation

2. Different implementations have different specifics, like JRuby can
'require' a JAR file and need different activerecord drivers, etc.
There are also some JRuby-specific libraries that only make sens for
JRuby, and the whole Java Integration layer. So, folks need to figure
out when they run with JRuby and when they not.

Initially, the following code was wildly used:
if RUBY_PLATFORM =~ /java/

But this is fragile, and not 100% reliable (other implementations
might have "java" in their platform too!). We also have JRuby-specific
JRUBY_VERSION, so one might check that one. But, when the number of
implementations grows, it gets less and less convenient to use
implementation-specific means to detect the implementation. Hence, the
proposal for that constant. So that the folks could easily and
reliably detect the implementation.

> I heard it is used to know command name at the IRC meeting.
> I think it is not good idea.

Agreed, this is not a good idea, and the constant is not for this. It
has justa short Ruby implementation identificator, like "jruby",
"rbx", etc.

Thanks,
  --Vladimir