Avoid passing bogus -classpath when empty#9272
Merged
headius merged 3 commits intojruby:jruby-10.0from Mar 1, 2026
Merged
Conversation
If no CLASSPATH env is provided when running jruby.sh, we end up building a bogus classpath flag of `-classpath :`. Other situations may result in forms like `-classpath some.jar:` or `-classpath :some.jar`. The changes here avoid passing -classpath at all if empty, and only insert delimiters when concatenating classpaths if they are non-empty. Possible fix for jruby#9255
81d4d64 to
14dea60
Compare
Member
Author
|
@mrnoname1000 This appears to work fine but it's a little redundant in places. Maybe you have a suggestion to clean it up? |
Member
Author
|
Marked for 10.0.4.0 but probably should be backported to 9.4 (at least until we can make it upgradable after release). |
Contributor
Simplify classpath flag calculation
Member
Author
|
@mrnoname1000 Thank you! |
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.
If no CLASSPATH env is provided when running jruby.sh, we end up building a bogus classpath flag of
-classpath :. Other situations may result in forms like-classpath some.jar:or-classpath :some.jar. The changes here avoid passing -classpath at all if empty, and only insert delimiters when concatenating classpaths if they are non-empty.Possible fix for #9255