Gems in a jar: classpath vs. require

Hi,

I’m working on a project where I would like to have code running in a
ScriptingContainer under OSGi be able to load gems packaged in a jar.
I’ve found that a gem jar on the classpath is not automatically treated
as a gem path. A gem jar which is required is on the gem path. This is
contra1, which indicates that these two options are equivalent. I’ve
created a simplified (no OSGi) test case2 to demonstrate.

I’d like to look into this further, but I can’t find where in the JRuby
source the gems-from-jars behavior is implemented. If anyone can give me
a pointer, I’d appreciate it.

Rhett