Skip to content

Commit 5b0e7b9

Browse files
committed
Use actual bytecode version current JRuby will emit
1 parent f65e7b9 commit 5b0e7b9

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

spec/warbler/task_spec.rb

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -126,8 +126,9 @@ def run_task(t)
126126

127127
it "should allow bytecode version in config" do
128128
config.features << "compiled"
129-
config.bytecode_version = JRUBY_VERSION > "10" ? 21 : 8
130-
bytecode_version = [0x00, JRUBY_VERSION > "10" ? 0x41 : 0x34]
129+
java_version = org.jruby.RubyInstanceConfig::JAVA_VERSION
130+
config.bytecode_version = java_version - 44
131+
bytecode_version = [0x00, java_version]
131132
silence { run_task "warble" }
132133

133134
Warbler::ZipSupport.open("#{config.jar_name}.war") do |zf|

0 commit comments

Comments
 (0)