简体   繁体   English

如何设置Rubinius的语言模式?

[英]How do I set the language mode for Rubinius?

I'm trying to set the language mode in Rubinius, and it doesn't seem to work. 我正在尝试在Rubinius中设置语言模式,但这似乎不起作用。 I tried using the switch suggested by the Rubinius team in April 2012 in https://stackoverflow.com/a/10165964/38765 我尝试使用Rubinius小组在2012年4月在https://stackoverflow.com/a/10165964/38765中建议的开关

$ ruby --version
rubinius 2.0.0.n203 (1.9.3 4d75a146 2013-07-22 JI) [x86_64-apple-darwin11.4.2]
$ ruby -X18
irb(main):001:0> RUBY_VERSION
=> "1.9.3"
irb(main):002:0> exit
$ ruby -X20
irb(main):001:0> RUBY_VERSION
=> "1.9.3"

Is it possible to set language mode any more for Rubinius? 是否可以为Rubinius设置语言模式了?

You have to enable the language modes when compiling rubinius. 编译rubinius时必须启用语言模式。 From the docs : 文档

For example, to enable both 1.9 and 2.0 modes, with 1.9 the default, use the follwing configure options: 例如,要启用1.9和2.0模式(默认设置为1.9),请使用以下配置选项:

 ./configure --enable-version=1.9,2.0 --default-version=1.9 

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM