diff options
Diffstat (limited to 'lib/rubygems.rb')
-rw-r--r-- | lib/rubygems.rb | 18 |
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 $~ |