diff options
author | drbrain <drbrain@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2011-07-27 01:40:07 +0000 |
---|---|---|
committer | drbrain <drbrain@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2011-07-27 01:40:07 +0000 |
commit | 035ef0a3475943d92f813a6449a33dc07b6d4e4c (patch) | |
tree | 67116d189b67fad9406635921f7aaf088e69495d /lib/rubygems.rb | |
parent | b9c485aa0d6f13303e7e9ab05c6d2b2496610a35 (diff) | |
download | ruby-035ef0a3475943d92f813a6449a33dc07b6d4e4c.tar.gz |
* lib/rubygems: Update to RubyGems 1.8.6.1.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32693 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/rubygems.rb')
-rw-r--r-- | lib/rubygems.rb | 43 |
1 files changed, 25 insertions, 18 deletions
diff --git a/lib/rubygems.rb b/lib/rubygems.rb index 25d8bc4e01..9316a2569f 100644 --- a/lib/rubygems.rb +++ b/lib/rubygems.rb @@ -1,9 +1,3 @@ -###################################################################### -# This file is imported from the rubygems project. -# DO NOT make modifications in this repo. They _will_ be reverted! -# File a patch instead and assign it to Ryan Davis or Eric Hodel. -###################################################################### - # -*- ruby -*- #-- # Copyright 2006 by Chad Fowler, Rich Kilmer, Jim Weirich and others. @@ -124,7 +118,7 @@ require "rubygems/deprecate" # -The RubyGems Team module Gem - VERSION = '1.8.5.1' + VERSION = '1.8.6.1' ## # Raised when RubyGems is unable to load or activate a gem. Contains the @@ -426,15 +420,15 @@ module Gem def self.each_load_path(partials) partials.each do |gp| base = File.basename gp - specfn = dir.specifications.add(base + ".gemspec") - if specfn.exist? - spec = eval(specfn.read) + specfn = File.join(dir, "specifications", "#{base}.gemspec") + if File.exists? specfn + spec = eval(File.read(specfn)) spec.require_paths.each do |rp| - yield(gp.add(rp)) + yield File.join(gp,rp) end else - filename = dir.add(gp, 'lib') - yield(filename) if filename.exist? + filename = File.join(gp, 'lib') + yield(filename) if File.exists? filename end end end @@ -589,7 +583,7 @@ module Gem Gem.path.each do |gemdir| each_load_path(latest_partials(gemdir)) do |load_path| - result << gemdir.add(load_path).expand_path + result << load_path end end @@ -644,10 +638,23 @@ module Gem # Loads YAML, preferring Psych def self.load_yaml - require 'psych' - rescue ::LoadError - ensure - require 'yaml' + begin + require 'psych' + rescue ::LoadError + ensure + require 'yaml' + end + + # Hack to handle syck's DefaultKey bug with psych. + # See the note at the top of lib/rubygems/requirement.rb for + # why we end up defining DefaultKey more than once. + if !defined? YAML::Syck + YAML.module_eval do + const_set 'Syck', Module.new { + const_set 'DefaultKey', Class.new + } + end + end end ## |