Skip to content

Instantly share code, notes, and snippets.

@jkutner
Last active August 29, 2015 14:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jkutner/b181846c804f81e12b49 to your computer and use it in GitHub Desktop.
Save jkutner/b181846c804f81e12b49 to your computer and use it in GitHub Desktop.
JRuby 9k java spec version for jrubyc
$ jrubyc spec/sample_war/lib/ruby_one_nine.rb
Picked up JAVA_TOOL_OPTIONS: -Djava.specification.version=1.6
$ javap -v ruby_one_nine | grep "major"
Warning: Binary file ruby_one_nine contains spec.sample_war.lib.ruby_one_nine
major version: 50
$ jirb
jruby-1.7.19 :003 > File.new('spec/sample_war/lib/ruby_one_nine.class', 'r').read[6..7]
=> "\u00002"
# switch to jruby-9k-SNAPSHOT
$ jrubyc spec/sample_war/lib/ruby_one_nine.rb
Picked up JAVA_TOOL_OPTIONS: -Djava.specification.version=1.6
$ javap -v ruby_one_nine | grep "major"
Warning: Binary file ruby_one_nine contains spec.sample_war.lib.ruby_one_nine
major version: 51
irb(main):001:0> File.new('spec/sample_war/lib/ruby_one_nine.class', 'r').read[6..7]
=> "\u00003"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment