aboutsummaryrefslogtreecommitdiffstats
path: root/lib/rubygems.rb
diff options
context:
space:
mode:
authordrbrain <drbrain@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-08-26 20:24:51 +0000
committerdrbrain <drbrain@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-08-26 20:24:51 +0000
commite487a7f53cffbadf0bf15ff169c9cb5898503250 (patch)
treeeaa80eb4ced6fcdcc8b327d1cc5e47f66703fd1b /lib/rubygems.rb
parentcddd93a57568966b416e300529bdffc0c7e87b51 (diff)
downloadruby-e487a7f53cffbadf0bf15ff169c9cb5898503250.tar.gz
* 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
Diffstat (limited to 'lib/rubygems.rb')
-rw-r--r--lib/rubygems.rb18
1 files changed, 8 insertions, 10 deletions
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
# <tt>gem server</tt>)
-# * {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 $~