Permalink
Browse files

Fix script/generate warning

  • Loading branch information...
1 parent 68d84e2 commit 326036de46b0a89d8f23eabfde8b772bd31a7ad6 @lifo lifo committed Oct 21, 2008
Showing with 2 additions and 1 deletion.
  1. +2 −1 railties/lib/rails_generator/lookup.rb
View
3 railties/lib/rails_generator/lookup.rb
@@ -208,7 +208,8 @@ def initialize
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

0 comments on commit 326036d

Please sign in to comment.