Skip to content
  • Simon Coffey's avatar
    b4a96686
    Ensure all-caps nested consts marked as autoloaded · b4a96686
    Simon Coffey authored
    Previously, an autoloaded constant `HTML::SomeClass` would not be marked
    as autoloaded by AS::Dependencies. This is because the
    `#loadable_constants_for_path` method uses `String#camelize` on the
    inferred file path, which in turn means that, unless otherwise directed,
    AS::Dependencies watches for loaded constants in the `Html` namespace.
    
    By passing the original qualified constant name to `#load_or_require`,
    this inference step is avoided, and the new constant is picked up in the
    correct namespace.
    b4a96686
    Ensure all-caps nested consts marked as autoloaded
    Simon Coffey authored
    Previously, an autoloaded constant `HTML::SomeClass` would not be marked
    as autoloaded by AS::Dependencies. This is because the
    `#loadable_constants_for_path` method uses `String#camelize` on the
    inferred file path, which in turn means that, unless otherwise directed,
    AS::Dependencies watches for loaded constants in the `Html` namespace.
    
    By passing the original qualified constant name to `#load_or_require`,
    this inference step is avoided, and the new constant is picked up in the
    correct namespace.
Loading