mirror of
https://github.com/ruby/ruby.git
synced 2025-08-23 21:14:23 +02:00
Run cleanup code in ensure
This commit is contained in:
parent
99503ab975
commit
edabdd95a8
1 changed files with 4 additions and 4 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue