ruby-changes:24719
From: naruse <ko1@a...>
Date: Wed, 22 Aug 2012 11:22:15 +0900 (JST)
Subject: [ruby-changes:24719] naruse:r36770 (trunk): * lib/rubygems/test_case.rb: run test with psych if exist.
naruse 2012-08-22 11:22:03 +0900 (Wed, 22 Aug 2012) New Revision: 36770 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=36770 Log: * lib/rubygems/test_case.rb: run test with psych if exist. Modified files: trunk/ChangeLog trunk/lib/rubygems/test_case.rb trunk/test/rubygems/test_gem_specification.rb Index: ChangeLog =================================================================== --- ChangeLog (revision 36769) +++ ChangeLog (revision 36770) @@ -1,3 +1,7 @@ +Wed Aug 22 11:20:47 2012 NARUSE, Yui <naruse@r...> + + * lib/rubygems/test_case.rb: run test with psych if exist. + Thu Aug 16 12:09:51 2012 Yuki Yugui Sonoda <yugui@g...> * nacl/pepper_main.c (init_loadpath): Pushes the correct load path on Index: lib/rubygems/test_case.rb =================================================================== --- lib/rubygems/test_case.rb (revision 36769) +++ lib/rubygems/test_case.rb (revision 36770) @@ -207,6 +207,9 @@ Gem.pre_uninstall do |uninstaller| @pre_uninstall_hook_arg = uninstaller end + + @orig_yamler = YAML::ENGINE.yamler + YAML::ENGINE.yamler = 'psych' rescue nil end ## @@ -238,6 +241,8 @@ else ENV.delete 'HOME' end + + YAML::ENGINE.yamler = @orig_yamler end ## Index: test/rubygems/test_gem_specification.rb =================================================================== --- test/rubygems/test_gem_specification.rb (revision 36769) +++ test/rubygems/test_gem_specification.rb (revision 36770) @@ -39,8 +39,6 @@ def setup super - @orig_yamler = YAML::ENGINE.yamler - YAML::ENGINE.yamler = 'psych' @a1 = quick_spec 'a', '1' do |s| s.executable = 'exec' @@ -67,11 +65,6 @@ load 'rubygems/syck_hack.rb' end - def teardown - super - YAML::ENGINE.yamler = @orig_yamler - end - def test_self_attribute_names expected_value = %w[ authors -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/