diff options
Diffstat (limited to 'lib/rubygems/specification.rb')
-rw-r--r-- | lib/rubygems/specification.rb | 18 |
1 files changed, 2 insertions, 16 deletions
diff --git a/lib/rubygems/specification.rb b/lib/rubygems/specification.rb index 942e49bf84..c1286369be 100644 --- a/lib/rubygems/specification.rb +++ b/lib/rubygems/specification.rb @@ -743,9 +743,6 @@ class Gem::Specification < Gem::BasicSpecification def self._all # :nodoc: unless defined?(@@all) && @@all @@all = stubs.map(&:to_spec) - if @@all.any?(&:nil?) # TODO: remove once we're happy - raise "pid: #{$$} nil spec! included in #{stubs.inspect}" - end # After a reset, make sure already loaded specs # are still marked as activated. @@ -896,7 +893,6 @@ class Gem::Specification < Gem::BasicSpecification # -- wilsonb def self.all=(specs) - raise "nil spec!" if specs.any?(&:nil?) # TODO: remove once we're happy @@stubs_by_name = specs.group_by(&:name) @@all = @@stubs = specs end @@ -1498,16 +1494,7 @@ class Gem::Specification < Gem::BasicSpecification paths = full_require_paths - # gem directories must come after -I and ENV['RUBYLIB'] - insert_index = Gem.load_path_insert_index - - if insert_index - # gem directories must come after -I and ENV['RUBYLIB'] - $LOAD_PATH.insert(insert_index, *paths) - else - # we are probably testing in core, -I and RUBYLIB don't apply - $LOAD_PATH.unshift(*paths) - end + Gem.add_to_load_path(*paths) end ## @@ -1927,8 +1914,7 @@ class Gem::Specification < Gem::BasicSpecification end def gems_dir - # TODO: this logic seems terribly broken, but tests fail if just base_dir - @gems_dir ||= File.join(loaded_from && base_dir || Gem.dir, "gems") + @gems_dir ||= File.join(base_dir, "gems") end ## |