Ruby 1.9 compat: use .to_a instead of .map which now returns an enumerator

git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8437 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
This commit is contained in:
Jeremy Kemper 2007-12-19 04:21:12 +00:00
parent 16c3ec7b28
commit d7515d4b09
1 changed files with 1 additions and 1 deletions

View File

@ -139,7 +139,7 @@ module Rails
private
# Lookup and cache every generator from the source list.
def cache
@cache ||= sources.inject([]) { |cache, source| cache + source.map }
@cache ||= sources.inject([]) { |cache, source| cache + source.to_a }
end
# Clear the cache whenever the source list changes.