The problem that is causing this is based on how we store autoloads. We store them based on their fully qualified name (based on containment): Foo::Bar for :Bar in Foo. This is ok until we dup. At that point, the autoload in the dup'd module/class can no longer find the entry. I think MRI does not have this issue because they store autoload file info into a node and store it with the undef in the module. When a clone happens it clones the module constant table which clones the file info as well.
Undef is a constant in JRuby (essentially). We cannot store file into into it easily.
The problem that is causing this is based on how we store autoloads. We store them based on their fully qualified name (based on containment): Foo::Bar for :Bar in Foo. This is ok until we dup. At that point, the autoload in the dup'd module/class can no longer find the entry. I think MRI does not have this issue because they store autoload file info into a node and store it with the undef in the module. When a clone happens it clones the module constant table which clones the file info as well.
Undef is a constant in JRuby (essentially). We cannot store file into into it easily.