From e487a7f53cffbadf0bf15ff169c9cb5898503250 Mon Sep 17 00:00:00 2001 From: drbrain Date: Mon, 26 Aug 2013 20:24:51 +0000 Subject: * lib/rubygems: Import RubyGems 2.1.0 Release Candidate * test/rubygems: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42693 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- lib/rubygems.rb | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) (limited to 'lib/rubygems.rb') diff --git a/lib/rubygems.rb b/lib/rubygems.rb index bd81308ba6..79d9546296 100644 --- a/lib/rubygems.rb +++ b/lib/rubygems.rb @@ -8,7 +8,7 @@ require 'rbconfig' module Gem - VERSION = '2.1.0.rc.1' + VERSION = '2.1.0.rc.2' end # Must be first since it unloads the prelude from 1.9.2 @@ -36,9 +36,9 @@ require 'rubygems/errors' # # Further RubyGems documentation can be found at: # +# * {RubyGems Guides}[http://guides.rubygems.org] # * {RubyGems API}[http://rubygems.rubyforge.org/rdoc] (also available from # gem server) -# * {RubyGems Bookshelf}[http://docs.rubygems.org] # # == RubyGems Plugins # @@ -1048,16 +1048,14 @@ module Gem # def register_default_spec(spec) - new_format, prefix_pattern = nil + new_format = Gem.default_gems_use_full_paths? || spec.require_paths.any? {|path| spec.files.any? {|f| f.start_with? path } } - spec.files.each do |file| - if new_format == nil - new_format = spec.require_paths.any? {|path| file.start_with? path} - - prefix_group = spec.require_paths.map {|f| f + "/"}.join("|") - prefix_pattern = /^(#{prefix_group})/ - end + if new_format + prefix_group = spec.require_paths.map {|f| f + "/"}.join("|") + prefix_pattern = /^(#{prefix_group})/ + end + spec.files.each do |file| if new_format file = file.sub(prefix_pattern, "") next unless $~ -- cgit v1.2.3