diff options
author | rick <rick@spacemonkey.local> | 2008-05-06 01:20:59 -0700 |
---|---|---|
committer | rick <rick@spacemonkey.local> | 2008-05-06 01:20:59 -0700 |
commit | 92e2e5990cc2aa4f699c286ac5d1f73e27ede548 (patch) | |
tree | c9a5056d35b4ae9d985eb6990133bd2c5a47cb13 /railties/lib/rails/plugin | |
parent | 0697d17d121fcf9f46b5dd2dd1034dffa19ebdf2 (diff) | |
download | rails-92e2e5990cc2aa4f699c286ac5d1f73e27ede548.tar.gz rails-92e2e5990cc2aa4f699c286ac5d1f73e27ede548.tar.bz2 rails-92e2e5990cc2aa4f699c286ac5d1f73e27ede548.zip |
include bugfix to [e792d4ab70448f79142fdf492390682ff5ea6398] for rubygems 1.0.1. Gem::DependencyList#dependency_order was bombing with nil specs passed in from a frozen gem. [#122]
Diffstat (limited to 'railties/lib/rails/plugin')
-rw-r--r-- | railties/lib/rails/plugin/locator.rb | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/railties/lib/rails/plugin/locator.rb b/railties/lib/rails/plugin/locator.rb index fd7de4ee28..f06a51a572 100644 --- a/railties/lib/rails/plugin/locator.rb +++ b/railties/lib/rails/plugin/locator.rb @@ -78,11 +78,12 @@ module Rails # a <tt>rails/init.rb</tt> file. class GemLocator < Locator def plugins - specs = initializer.configuration.gems.map(&:specification) - specs + Gem.loaded_specs.values.select do |spec| + specs = initializer.configuration.gems.map(&:specification) + specs += Gem.loaded_specs.values.select do |spec| spec.loaded_from && # prune stubs File.exist?(File.join(spec.full_gem_path, "rails", "init.rb")) end + specs.compact! require "rubygems/dependency_list" |