Michal Suchanek wrote:
> On 27/07/2008, Brian Ford <brixen / gmail.com> wrote:
> 
>> 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.
> 
> However, there are at least two interpretations of of "the thing that
> makes your Ruby code run":
> 1) "the way the thing that makes your Ruby code run is implemented"
> 2) "the file that holds the thing that makes your Ruby code run"

JRuby is JRuby no matter how you want to slice it. But there's no 
variable that can consistently tell you you're running on JRuby or 
Rubinius other than RUBY_ENGINE, unless you cobble together checks of 
multiple other variables.

- Charlie