The attached patch adds the ability to add multiple Configuration#after_initialize blocks. Currently you can only have one, and if you define more then one only the last one set is going to be run.
This adds more flexibility at basically no cost for rails developers and plugin developers to be able to add their own custom hook code to the after initialization process.
Example of what this patch does:
# in environment.rb
Rails::Initializer.run do |config|
after_initialize do
# this is called
end
end
# in a development.rb, test.rb or production.rb
config.after_initialize do
# this is also called
end
# in a plugin's init.rb file
config.after_initialize do
# this is also called
end