RUBY_引擎的哪些值对应于哪些RUBY实现?
我所知道的在运行时检测Ruby实现(如MRI、JRuby、Rubinius等)的方法是检查全局常量RUBY_引擎的哪些值对应于哪些RUBY实现?,ruby,jruby,macruby,rubinius,Ruby,Jruby,Macruby,Rubinius,我所知道的在运行时检测Ruby实现(如MRI、JRuby、Rubinius等)的方法是检查全局常量Ruby_引擎: $ ruby -e 'puts RUBY_ENGINE' ruby Ruby_ENGINE的已知Ruby实现及其对应值的合理综合列表是什么?以下是我迄今为止的发现: | RUBY_ENGINE | Implementation | |:-----------:|:------------------| | <undefined> | MRI < 1.9
Ruby_引擎
:
$ ruby -e 'puts RUBY_ENGINE'
ruby
Ruby_ENGINE的已知Ruby实现及其对应值的合理综合列表是什么?以下是我迄今为止的发现:
| RUBY_ENGINE | Implementation |
|:-----------:|:------------------|
| <undefined> | MRI < 1.9 |
| 'ruby' | MRI >= 1.9 or REE |
| 'jruby' | JRuby |
| 'macruby' | MacRuby |
| 'rbx' | Rubinius |
| 'maglev' | MagLev |
| 'ironruby' | IronRuby |
| 'cardinal' | Cardinal |
| RUBY|u引擎|实现|
|:-----------:|:------------------|
|| MRI<1.9|
|“红宝石”| MRI>=1.9或REE|
|“jruby”| jruby|
|“macruby”| macruby|
|“rbx”| Rubinius|
|“磁悬浮”|磁悬浮|
|“ironruby”| ironruby|
|“红衣主教”|红衣主教|
上述Ruby实现的链接:
- (Matz的Ruby解释器),Ruby参考实现
- (红宝石企业版)
| RUBY_ENGINE | Implementation |
|:-----------:|:------------------|
| "ruby" | REE |
| "maglev" | MagLev |