Looks like the code changed in edge rails, but as a temporary patch do
this one line change in environment.rb which avoids calling Module#name
if there is no name:
module ActionView
module Helpers
module PrototypeHelper
class JavaScriptGenerator
def include_helpers_from_context
@context.extended_by.each do |mod|
extend mod unless defined?(mod) == 'constant' && mod.name =~
/^ActionView::Helpers/
end
extend GeneratorMethods
end
end
end
end
end
Adding the same number of constants again doubles those numbers - it
would appear that there is something in ruby that makes Module#name
linear in the number of constants set in the case where the name is
unset
So I don't think Rails is doing anything that makes this worse, other
than defining a whole bunch of constants