As discussed on the rails-core ML (14/12/2006), here's a patch to enable the loading of plugins in the order specified in config.plugins. There are a few things to note:
- since order is important, Rails::Initializer#loaded_plugins is now an Array rather than a Set
- The semantics of config.plugins were slightly broken. Setting config.plugins = [] should mean that *no* plugins are loaded; if an Array of N names implies that N plugins will be loaded, an Array of 0 names should result in 0 plugins being loaded. The (new) default value config.plugins = nil ensures that *all* plugins are loaded in sorted order (the default behaviour, as before).
Tests are included and I've beefed up the RDoc around config.plugins; I've also added tests for general config.plugins behaviour, since they weren't included in #6418.