From 5cab66cbcfd2c1d1b1da916b7e7b2be8b41cc06a Mon Sep 17 00:00:00 2001 From: naruse Date: Thu, 29 Nov 2012 08:34:52 +0000 Subject: [PATCH] * lib/rubygems.rb (Gem.load_yaml): return if Kernel#gem is not defined yet. This causes crash if test-all requires libraries in a certain order. A simple reproducible code is ruby --disable-gem -e'require"yaml";require"minitest/autorun"' git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37989 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ChangeLog | 9 ++++++++- lib/rubygems.rb | 1 + 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index e63d29b51a..31d8d2da3d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +Thu Nov 29 17:31:53 2012 NARUSE, Yui + + * lib/rubygems.rb (Gem.load_yaml): return if Kernel#gem is not defined + yet. This causes crash if test-all requires libraries in a certain + order. A simple reproducible code is + ruby --disable-gem -e'require"yaml";require"minitest/autorun"' + Thu Nov 29 17:19:26 2012 Eric Hodel * lib/tracer.rb: Updated to match removal of custom_require from @@ -34,7 +41,7 @@ Thu Nov 29 16:18:14 2012 Eric Hodel * lib/rubygems/test_case.rb: Disable loading of keys and certificates outside rubygems or ruby tests as the files are not available (or - necessary). + necessary). Thu Nov 29 16:14:41 2012 Koichi Sasada diff --git a/lib/rubygems.rb b/lib/rubygems.rb index 1494e915f7..72669fe65b 100644 --- a/lib/rubygems.rb +++ b/lib/rubygems.rb @@ -536,6 +536,7 @@ module Gem def self.load_yaml return if @yaml_loaded + return unless defined?(gem) test_syck = ENV['TEST_SYCK']