Update test suites with JRuby 10 compatibility#84
Merged
Conversation
JRuby 10 requires Java 21 or newer. Attempting to run tests under Java 17 just results in a pile of type errors from the Java compiler. Signed-off-by: Charlie Sharpsteen <charlie@overlookinfratech.com>
The `org.jruby.CompatVersion` class was used by JRuby 1.x to switch the Ruby language version targeted by its interpreter between 1.8.x, 1.9.x, and 2.x. This functionality was reduced to a deprecated no-op in JRuby 9.0 and finally removed in JRuby 10.0. This commit removes all imports of `org.jruby.CompatVersion` from `jruby-utils` code as they cause tests to fail under JRuby 10. None of the imports were actually used, they were all dead code. Signed-off-by: Charlie Sharpsteen <charlie@overlookinfratech.com>
This commit updates one of the core unit tests to stop looking for a specific JRuby version and to instead accept any version string that starts with "jruby". This allows the test suite to pass on both JRuby 9.4 and JRuby 10, and keeps things open for future versions. Signed-off-by: Charlie Sharpsteen <charlie@overlookinfratech.com>
bastelfreak
approved these changes
Jul 7, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Short description
This changeset updates the test suite to be compatible with both JRuby 9 and 10:
org.jruby.CompatVersionwere removed as that class no longer exists in JRuby 10. These were all dead code as theCompatVersionclass was never utilized.jruby-core/jruby-version-inforeturns data was made generic instead of version-specific.Checklist
I have:
Signed-off-byannotation to each of my commitsGenerated-byorAssisted-byannotations to each of my commits created with the help of an AI agent