From edabdd95a84a31c61bab651584d58fe7f695552a Mon Sep 17 00:00:00 2001 From: Nobuyoshi Nakada Date: Fri, 21 Mar 2025 11:05:57 +0900 Subject: [PATCH] Run cleanup code in `ensure` --- test/ruby/test_marshal.rb | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/test/ruby/test_marshal.rb b/test/ruby/test_marshal.rb index 404a954c4b..e4f6e5e91a 100644 --- a/test/ruby/test_marshal.rb +++ b/test/ruby/test_marshal.rb @@ -653,10 +653,10 @@ class TestMarshal < Test::Unit::TestCase Marshal.load(d) } - # cleanup + ensure self.class.class_eval do remove_const name - end + end if c end def test_unloadable_userdef @@ -670,10 +670,10 @@ class TestMarshal < Test::Unit::TestCase Marshal.load(d) } - # cleanup + ensure self.class.class_eval do remove_const name - end + end if c end def test_recursive_userdef