简体   繁体   中英

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. I tried using the switch suggested by the Rubinius team in April 2012 in 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?

You have to enable the language modes when compiling 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:

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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