remove warning & support multi-run test for test/psych/visitors/test_to_ruby.rb (#2881)

This commit is contained in:
S.H 2020-02-07 19:35:52 +09:00 committed by GitHub
parent b64b0f3433
commit 38ed8cbb5f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
Notes: git 2020-02-07 19:36:21 +09:00
Merged-By: nurse <naruse@airemix.jp>

View File

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