diff options
author | Pratik Naik <pratiknaik@gmail.com> | 2008-10-21 01:47:27 +0100 |
---|---|---|
committer | Pratik Naik <pratiknaik@gmail.com> | 2008-10-21 01:47:44 +0100 |
commit | 326036de46b0a89d8f23eabfde8b772bd31a7ad6 (patch) | |
tree | 0b842124fa49e9349c1c9390f91ee5eb21ddbd58 /railties/lib/rails_generator | |
parent | 68d84e259346c1bc3d8fd546162e5a93caf0bbdc (diff) | |
download | rails-326036de46b0a89d8f23eabfde8b772bd31a7ad6.tar.gz rails-326036de46b0a89d8f23eabfde8b772bd31a7ad6.tar.bz2 rails-326036de46b0a89d8f23eabfde8b772bd31a7ad6.zip |
Fix script/generate warning
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 |