From d7515d4b09e8384ac99d019fe512d7e4aadffd1c Mon Sep 17 00:00:00 2001 From: Jeremy Kemper Date: Wed, 19 Dec 2007 04:21:12 +0000 Subject: 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 --- railties/lib/rails_generator/lookup.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'railties/lib/rails_generator') diff --git a/railties/lib/rails_generator/lookup.rb b/railties/lib/rails_generator/lookup.rb index 598cb79e73..d88a1948a4 100644 --- a/railties/lib/rails_generator/lookup.rb +++ b/railties/lib/rails_generator/lookup.rb @@ -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. -- cgit v1.2.3