summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorS.H <gamelinks007@gmail.com>2020-02-07 19:35:52 +0900
committerHiroshi SHIBATA <hsbt@ruby-lang.org>2020-06-23 14:14:07 +0900
commit4893a4bf7a8205dbcfbcb0e3cb24f0a867ad003a (patch)
tree92a53d2156bb472dddae968acc5f724908e4b081 /test
parent7d744e48169625ccf21f5efa499f3007a1e9dd4d (diff)
downloadpsych-4893a4bf7a8205dbcfbcb0e3cb24f0a867ad003a.zip
remove warning & support multi-run test for test/psych/visitors/test_to_ruby.rb (#2881)
Diffstat (limited to 'test')
-rw-r--r--test/psych/visitors/test_to_ruby.rb1
1 files changed, 1 insertions, 0 deletions
diff --git a/test/psych/visitors/test_to_ruby.rb b/test/psych/visitors/test_to_ruby.rb
index f342bf0..0ebfe9b 100644
--- a/test/psych/visitors/test_to_ruby.rb
+++ b/test/psych/visitors/test_to_ruby.rb
@@ -24,6 +24,7 @@ module Psych
end
def test_legacy_struct
+ Struct.send(:remove_const, AWESOME) if Struct.const_defined?(:AWESOME)
foo = Struct.new('AWESOME', :bar)
assert_equal foo.new('baz'), Psych.load(<<-eoyml)
!ruby/struct:AWESOME