Skip to content
Browse files

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

…rator

git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8437 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
  • Loading branch information...
1 parent 16c3ec7 commit d7515d4b09e8384ac99d019fe512d7e4aadffd1c @jeremy jeremy committed Dec 19, 2007
Showing with 1 addition and 1 deletion.
  1. +1 −1 railties/lib/rails_generator/lookup.rb
View
2 railties/lib/rails_generator/lookup.rb
@@ -139,7 +139,7 @@ def instance(generator_name, args = [], runtime_options = {})
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.

0 comments on commit d7515d4

Please sign in to comment.
Something went wrong with that request. Please try again.