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:
parent
68d84e2593
commit
326036de46
1 changed files with 2 additions and 1 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue