diff options
Diffstat (limited to 'railties/lib/rails_generator')
-rw-r--r-- | railties/lib/rails_generator/lookup.rb | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/railties/lib/rails_generator/lookup.rb b/railties/lib/rails_generator/lookup.rb index 0526d526ad..a3525364a2 100644 --- a/railties/lib/rails_generator/lookup.rb +++ b/railties/lib/rails_generator/lookup.rb @@ -208,7 +208,8 @@ module Rails class GemGeneratorSource < AbstractGemSource # Yield latest versions of generator gems. def each - Gem::cache.search(/_generator$/).inject({}) { |latest, gem| + dependency = Gem::Dependency.new(/_generator$/, Gem::Requirement.default) + Gem::cache.search(dependency).inject({}) { |latest, gem| hem = latest[gem.name] latest[gem.name] = gem if hem.nil? or gem.version > hem.version latest |