FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Ensure we have a classloader to boot from by headius · Pull Request #9298 · jruby/jruby · GitHub

/ jruby Public

Ensure we have a classloader to boot from - #9298

Merged
headius merged 2 commits into
jruby:masterfrom
headius:ensure_boot_classloader
Mar 10, 2026
Merged

Ensure we have a classloader to boot from#9298
headius merged 2 commits into
jruby:masterfrom
headius:ensure_boot_classloader

Conversation

headius commented Mar 10, 2026

Copy link
Copy Markdown
Member

If JRuby is loaded in the bootstrap classloader, the direct getClassLoader for a Class object might return null. Use the alternative Ruby.getClassLoader instead which will fall back on the standard system classloader.

headius added this to the JRuby 10.1.0.0 milestone Mar 10, 2026
headius force-pushed the ensure_boot_classloader branch from 3b50823 to 50aee23 Compare March 10, 2026 19:19
headius added 2 commits March 10, 2026 14:49
If JRuby is loaded in the bootstrap classloader, the direct
getClassLoader for a Class object might return null. Use the
alternative Ruby.getClassLoader instead which will fall back on
the standard system classloader.
This adds a simpler path for classloader-based loading of files
when we just want to get the system classloader resources shipped
with JRuby. This will reduce the chance of someone using an
improper classloader (e.g. JRubyLibrary might have loaded the wrong
file from a JRubyClassLoader rather than the one shipped with
JRuby) or stumbling on to a null classloader (as sometimes happened
to the loads from javasupport.Java when running in a bootstrap
classloader).
headius force-pushed the ensure_boot_classloader branch from 50aee23 to 45189cb Compare March 10, 2026 19:49
headius enabled auto-merge March 10, 2026 20:39
headius disabled auto-merge March 10, 2026 20:39
headius merged commit c25d71e into jruby:master Mar 10, 2026
136 of 160 checks passed
headius deleted the ensure_boot_classloader branch March 10, 2026 20:39
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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant


Back | FazBrowse Home | New Git URL