ruby-changes:59955
From: S.H <ko1@a...>
Date: Fri, 7 Feb 2020 19:36:27 +0900 (JST)
Subject: [ruby-changes:59955] 59a40feec2 (master): remove warning & support multi-run test for test/psych_test_yaml.rb (#2887)
https://git.ruby-lang.org/ruby.git/commit/?id=59a40feec2 From 59a40feec27790cbe07955eb00f1bc125c8d95e8 Mon Sep 17 00:00:00 2001 From: "S.H" <gamelinks007@g...> Date: Fri, 7 Feb 2020 19:36:11 +0900 Subject: remove warning & support multi-run test for test/psych_test_yaml.rb (#2887) diff --git a/test/psych/test_yaml.rb b/test/psych/test_yaml.rb index 5fa759c..88787d3 100644 --- a/test/psych/test_yaml.rb +++ b/test/psych/test_yaml.rb @@ -1034,6 +1034,7 @@ EOY https://github.com/ruby/ruby/blob/trunk/test/psych/test_yaml.rb#L1034 end def test_ruby_struct + Struct.send(:remove_const, :MyBookStruct) if Struct.const_defined?(:MyBookStruct) # Ruby structures book_struct = Struct::new( "MyBookStruct", :author, :title, :year, :isbn ) assert_to_yaml( -- cgit v0.10.2 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/