gpt4 book ai didi

ruby - RUBY_ENGINE 的哪些值对应于哪些 Ruby 实现?

转载 作者:数据小太阳 更新时间:2023-10-29 06:40:57 45 4
gpt4 key购买 nike

我所知道的在运行时检测 Ruby 实现(例如 MRI、JRuby、Rubinius 等)的方法是检查全局常量 RUBY_ENGINE:

$ ruby -e 'puts RUBY_ENGINE'
ruby

什么是已知 Ruby 实现及其对应的 RUBY_ENGINE 值的合理全面列表?

最佳答案

这是我目前发现的:

| 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 实现的链接:

支持宇治久 this blog entry哪个有最多的值(value)。其他的是通过阅读找到的thisthis .从 StackOverflow 上的其他答案中收集了更多的值。为所有做出贡献的人提供更多 Prop !

关于ruby - RUBY_ENGINE 的哪些值对应于哪些 Ruby 实现?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/9894168/

45 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com