* test/rubygems/gemutilities.rb (setup, teardown):

Object#to_yaml must use syck on RubyGem.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27125 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
naruse 2010-03-31 04:57:31 +00:00
parent 0da3fc65db
commit 35b2c59ac0
2 changed files with 22 additions and 0 deletions

View File

@ -1,3 +1,8 @@
Wed Mar 31 13:53:13 2010 NARUSE, Yui <naruse@ruby-lang.org>
* test/rubygems/gemutilities.rb (setup, teardown):
Object#to_yaml must use syck on RubyGem.
Wed Mar 31 06:57:14 2010 Tanaka Akira <akr@fsij.org>
* time.c (timew2timespec): fix previous change.

View File

@ -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