1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

Fix script/generate warning

This commit is contained in:
Pratik Naik 2008-10-21 01:47:27 +01:00
parent 68d84e2593
commit 326036de46

View file

@ -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