Commit 8a7e30f
committed
Consider .class a source extension during search
The logic here was ported from CRuby, which only considers .rb to
be a source extension. This causes our logic to think a filename
like "foo.class" is not a source file and try to load it as either
"foo.class.rb" or "foo.class.class". This is the cause of jruby#8758 and
prevents explicitly loading precompiled Ruby sources using the
filename with .class extension.
The fix here modifies the source extension check to also consider
other configured source extensions, so that when .class searching
is enabled, we will properly treat `require "foo.class"` as a
source file.
Fixes jruby#87581 parent 8579650 commit 8a7e30f
File tree
1 file changed
+6
-1
lines changed- core/src/main/java/org/jruby/runtime/load
1 file changed
+6
-1
lines changedLines changed: 6 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
250 | 250 | | |
251 | 251 | | |
252 | 252 | | |
253 | | - | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
254 | 259 | | |
255 | 260 | | |
256 | 261 | | |
| |||
0 commit comments