Skip to content
  • Jean Boussier's avatar
    510d761f
    Explicitly order Railties by load order · 510d761f
    Jean Boussier authored
    Until now they were implicitly ordered by load order because of
    `DescendantTracker#descendants` register them through the `inherited`
    callback.
    
    But now that on Ruby 3.1 we use the native `Class#descendants`,
    the ordering is rather random, or at least can't be relied on.
    
    So we add a counter and assign an index on every Railtie subclass
    to be able to sort them explictly later.
    510d761f
    Explicitly order Railties by load order
    Jean Boussier authored
    Until now they were implicitly ordered by load order because of
    `DescendantTracker#descendants` register them through the `inherited`
    callback.
    
    But now that on Ruby 3.1 we use the native `Class#descendants`,
    the ordering is rather random, or at least can't be relied on.
    
    So we add a counter and assign an index on every Railtie subclass
    to be able to sort them explictly later.
Loading