1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

use tsort_each to avoid intermediary array

This commit is contained in:
Aaron Patterson 2012-03-30 20:13:46 -07:00
parent ad95a61b62
commit 25f1d5da37

View file

@ -51,7 +51,7 @@ module Rails
def run_initializers(group=:default, *args)
return if instance_variable_defined?(:@ran)
initializers.tsort.each do |initializer|
initializers.tsort_each do |initializer|
initializer.run(*args) if initializer.belongs_to?(group)
end
@ran = true