config.plugins exclusion

Rails 1.2 will have a configuration option to specify plugins to load per environment. This is useful to specify plugin load order and only load specific plugins.

But what if you want to use it to exclude plugins? To load all plugins, the default value of config.plugins is nil. This means you cannot use -= to do:
config.plugins -= %W(exception_notification ssl_requirement)

The problem with setting config.plugins to an array of all plugins by default is that the plugin path is also a configuration option. Therefore, setting config.plugins to an array of all plugins will introduce configuration order dependency, which is not good.

However, if you do want to use config.plugins to exclude loading certain plugins, this code works and is the best I could come up with:

config.plugins = Rails::Initializer.new(config).send(:find_plugins, config.plugin_paths).map {|path| File.basename(path)}
config.plugins -= %W(plugin_one plugin_two)