mirror of
https://github.com/github/rails.git
synced 2026-01-30 16:58:15 -05:00
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:
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user