summaryrefslogtreecommitdiff
path: root/test/psych/visitors/test_to_ruby.rb
diff options
context:
space:
mode:
authorS.H <gamelinks007@gmail.com>2020-02-07 19:35:52 +0900
committerGitHub <noreply@github.com>2020-02-07 19:35:52 +0900
commit38ed8cbb5f77d0fd67ae4aadc6a978b303d3c0e9 (patch)
tree2438ae5fa708ef6cb4e658bf10244bd34f6c3340 /test/psych/visitors/test_to_ruby.rb
parentb64b0f3433b1dafa50ecd12b86567e3df863d57a (diff)
remove warning & support multi-run test for test/psych/visitors/test_to_ruby.rb (#2881)
Notes
Notes: Merged-By: nurse <naruse@airemix.jp>
Diffstat (limited to 'test/psych/visitors/test_to_ruby.rb')
-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 f342bf0a1a..0ebfe9bab0 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