Permalink
Browse files

Merge commit 'v1.8.15' into jruby-rubygems_1_8_15

  • Loading branch information...
2 parents 15c4691 + 0034e05 commit a7094eb527bfa0c6bc6094a851bd545ecb8bd4ab @headius headius committed Jan 26, 2012
Showing with 39 additions and 1 deletion.
  1. +13 −0 History.txt
  2. +7 −1 lib/rubygems.rb
  3. +11 −0 lib/rubygems/requirement.rb
  4. +2 −0 lib/rubygems/specification.rb
  5. +6 −0 lib/rubygems/version.rb
View
@@ -1,5 +1,18 @@
# coding: UTF-8
+=== 1.8.15 / 2012-01-06
+
+* 1 bug fix:
+
+ * Don't eager load yaml, it creates a bad loop. Fixes #256
+
+=== 1.8.14 / 2012-01-05
+
+* 2 bug fixes:
+
+ * Ignore old/bad cache data in Version
+ * Make sure our YAML workarounds are loaded properly. Fixes #250.
+
=== 1.8.13 / 2011-12-21
* 1 bug fix:
View
@@ -118,7 +118,7 @@ class << Gem
# -The RubyGems Team
module Gem
- VERSION = '1.8.13'
+ VERSION = '1.8.15'
##
# Raised when RubyGems is unable to load or activate a gem. Contains the
@@ -639,10 +639,14 @@ def self.load_path_insert_index
index
end
+ @yaml_loaded = false
+
##
# Loads YAML, preferring Psych
def self.load_yaml
+ return if @yaml_loaded
+
begin
gem 'psych', '~> 1.2', '>= 1.2.1' unless ENV['TEST_SYCK']
rescue Gem::LoadError
@@ -661,6 +665,8 @@ def self.load_yaml
# Now that we're sure some kind of yaml library is loaded, pull
# in our hack to deal with Syck's DefaultKey ugliness.
require 'rubygems/syck_hack'
+
+ @yaml_loaded = true
end
##
@@ -4,6 +4,15 @@
# A Requirement is a set of one or more version restrictions. It supports a
# few (<tt>=, !=, >, <, >=, <=, ~></tt>) different restriction operators.
+# REFACTOR: The fact that a requirement is singular or plural is kind of
+# awkward. Is Requirement the right name for this? Or should it be one
+# [op, number] pair, and we call the list of requirements something else?
+# Since a Requirement is held by a Dependency, maybe this should be made
+# singular and the list aspect should be pulled up into Dependency?
+
+require "rubygems/version"
+require "rubygems/deprecate"
+
class Gem::Requirement
include Comparable
@@ -175,6 +184,8 @@ def <=> other # :nodoc:
private
def fix_syck_default_key_in_requirements
+ Gem.load_yaml
+
# Fixup the Syck DefaultKey bug
@requirements.each do |r|
if r[0].kind_of? Gem::SyckDefaultKey
@@ -484,6 +484,8 @@ def self.find_in_unresolved_tree path
# +input+ can be anything that YAML.load() accepts: String or IO.
def self.from_yaml(input)
+ Gem.load_yaml
+
input = normalize_yaml_input input
spec = YAML.load input
View
@@ -238,6 +238,12 @@ def marshal_load array
initialize array[0]
end
+ def yaml_initialize(tag, map)
+ @version = map['version']
+ @segments = nil
+ @hash = nil
+ end
+
##
# A version is considered a prerelease if it contains a letter.

0 comments on commit a7094eb

Please sign in to comment.