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:
parent
16c3ec7b28
commit
d7515d4b09
|
@ -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.
|
||||
|
|
Loading…
Reference in New Issue