Run cleanup code in ensure

This commit is contained in:
Nobuyoshi Nakada 2025-03-21 11:05:57 +09:00
parent 99503ab975
commit edabdd95a8
No known key found for this signature in database
GPG key ID: 3582D74E1FEE4465

View file

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