JRuby 1.7.0 appears to be defaulting to 1.8 mode on my Win7 32bit
system, but not my Arch system.
C:\Users\Jon>set j
JAVA_HOME=C:\Program Files\Java\jdk1.7.0_07
JRE_HOME=C:\Program Files\Java\jre7
C:\Users\Jon>jruby --version
jruby 1.7.0 (ruby-1.8.7p370) 2012-10-22 ff1ebbe on Java HotSpot™
Client VM 1.7.0_07-b10 [Windows 7-x86]
C:\Users\Jon>jruby -ve “h={a: 1, b: 2}; p h”
jruby 1.7.0 (ruby-1.8.7p370) 2012-10-22 ff1ebbe on Java HotSpot™
Client VM 1.7.0_07-b10 [Windows 7-x86]
SyntaxError: -e:1: syntax error, unexpected ‘:’
h={a: 1, b: 2}; p h
^
C:\Users\Jon>jruby --1.9 -ve “h={a: 1, b: 2}; p h”
jruby 1.7.0 (1.9.3p203) 2012-10-22 ff1ebbe on Java HotSpot™ Client VM
1.7.0_07-b10 [Windows 7-x86]
{:a=>1, :b=>2}
I’m not familiar with the JRuby source, but this all looks fine
https://github.com/jruby/jruby/blob/master/default.build.properties#L108
https://github.com/jruby/jruby/blob/master/src/org/jruby/runtime/Constants.java#L88-100
https://github.com/jruby/jruby/blob/master/src/org/jruby/util/cli/OutputStrings.java#L115-150
https://github.com/jruby/jruby/blob/master/src/org/jruby/RubyInstanceConfig.java#L86-87
https://github.com/jruby/jruby/blob/master/src/org/jruby/util/cli/Options.java#L128
so it’s something deeper I haven’t yet found.
Can any other JRuby on Windows users repro?
Jon
Fail fast. Fail often. Fail publicly. Learn. Adapt. Repeat.
http://thecodeshop.github.com | http://jonforums.github.com/
twitter: @jonforums