The test for this bug is an acceptance test, I feel like testing this particular behaviour would be better as a unit test for the LoadService (or NormalSearcher), but the visibility on the internals of the LoadService make this difficult to unit test.
Should we be doing work to factor the LoadService for unit testability?
Fix for relative require from within a gem on the classpath.
I'd love to be able to do better testing of JRuby internals, and refactoring could certainly help. We do have a JUnit-based test for LoadService you might look at editing.
I'll review your change.
The change looks pretty clean. I hate the fact that JVM mixes "jar:" and "jar:file:" URLs unpredictably, but this seems like a reasonable fix. Merging.