diff options
author | David Heinemeier Hansson <david@loudthinking.com> | 2008-10-21 02:55:30 +0200 |
---|---|---|
committer | David Heinemeier Hansson <david@loudthinking.com> | 2008-10-21 02:55:30 +0200 |
commit | d85a7aecbb74bcabff9c13eed980e58db62611c7 (patch) | |
tree | c5c685035b0a33766ae4bf8545c997ca30bcf3fb | |
parent | 448e7e7c04260c34b816eb951427fc4409843cc8 (diff) | |
parent | 326036de46b0a89d8f23eabfde8b772bd31a7ad6 (diff) | |
download | rails-d85a7aecbb74bcabff9c13eed980e58db62611c7.tar.gz rails-d85a7aecbb74bcabff9c13eed980e58db62611c7.tar.bz2 rails-d85a7aecbb74bcabff9c13eed980e58db62611c7.zip |
Merge branch 'master' of git@github.com:rails/rails
-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 |