Skip to content
  • Jeremy Evans's avatar
    08759ede
    Remove autoload for constant if the autoload fails · 08759ede
    Jeremy Evans authored
    Previously, if an autoload failed (the file was loaded, but the
    constant was not defined by the autoloaded file). Ruby will try
    to autoload again if you delete the autoloaded file from
    $LOADED_FEATURES.  With this change, the autoload and the
    constant itself are removed as soon as it fails.
    
    To handle cases where multiple threads are autoloading, when
    deleting an autoload, handle the case where another thread
    already deleted it.
    
    Fixes [Bug #15790]
    08759ede
    Remove autoload for constant if the autoload fails
    Jeremy Evans authored
    Previously, if an autoload failed (the file was loaded, but the
    constant was not defined by the autoloaded file). Ruby will try
    to autoload again if you delete the autoloaded file from
    $LOADED_FEATURES.  With this change, the autoload and the
    constant itself are removed as soon as it fails.
    
    To handle cases where multiple threads are autoloading, when
    deleting an autoload, handle the case where another thread
    already deleted it.
    
    Fixes [Bug #15790]
Loading