summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog5
-rw-r--r--test/rubygems/gemutilities.rb17
2 files changed, 22 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index 53e691b1c6..6a52c08444 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+Wed Mar 31 13:53:13 2010 NARUSE, Yui <[email protected]>
+
+ * test/rubygems/gemutilities.rb (setup, teardown):
+ Object#to_yaml must use syck on RubyGem.
+
Wed Mar 31 06:57:14 2010 Tanaka Akira <[email protected]>
* time.c (timew2timespec): fix previous change.
diff --git a/test/rubygems/gemutilities.rb b/test/rubygems/gemutilities.rb
index 6a806a2367..965d898abc 100644
--- a/test/rubygems/gemutilities.rb
+++ b/test/rubygems/gemutilities.rb
@@ -20,6 +20,7 @@ require 'uri'
require 'rubygems/package'
require 'rubygems/test_utilities'
require 'pp'
+require 'yaml'
begin
gem 'rdoc'
@@ -136,9 +137,25 @@ class RubyGemTestCase < MiniTest::Unit::TestCase
Gem.pre_uninstall do |uninstaller|
@pre_uninstall_hook_arg = uninstaller
end
+
+ Object.class_eval %q{
+ alias tmp_to_yaml to_yaml
+ def to_yaml( opts = {} )
+ YAML::quick_emit( self, opts ) do |out|
+ out.map( taguri, to_yaml_style ) do |map|
+ to_yaml_properties.each do |m|
+ map.add( m[1..-1], instance_variable_get( m ) )
+ end
+ end
+ end
+ end
+ }
end
def teardown
+ Object.class_eval %q{
+ alias to_yaml tmp_to_yaml
+ }
Gem::ConfigMap[:BASERUBY] = @orig_BASERUBY
Gem::ConfigMap[:arch] = @orig_arch