The Kernel versions of
test/jruby/test_autoload.rb has also been modified to match Ruby
The text was updated successfully, but these errors were encountered:
The Kernel versions of `autoload` use the caller's frame to determine the target module, where we were just detecting that `autoload` was called against Kernel and then defining the autoload on Object's singleton class. Other parts of autoload were not searching everything properly, or were not being triggered in the right places. * Fixes Kernel `autoload` and `autoload?` to use the caller's frame to determine the target module. * Fixes `autoload?` to check the constant tables for UNDEF before checking the autoload map, properly returning nil for autoload constants defined elsewhere without triggering autoload. * Fixes `const_defined?` to properly trigger autoload as in MRI's `rb_mod_const_defined`. * Adds overrides for autoload tables to IncludedModuleWrapper to aid the above searches. * Fixes an assertion in test/jruby/test_autoload that did not match MRI behavior. Fixes jruby#5466.