summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Zhu <peter.zhu@shopify.com>2021-08-04 15:33:47 -0400
committerPeter Zhu <peter@peterzhu.ca>2021-08-04 16:11:08 -0400
commit1fd0a2e4a62b70287dfce5bb1a66656b647d3899 (patch)
treeda3bed5eef680957b54089ff8edc0a5d3712acc6
parent5f2987d6c2ae9ace3178ac3e1bbb4ac7079101eb (diff)
Reenable GC at the end of test
The test disables GC but never reenables it. Before this patch, running all tests would have a peak RSS in the main process of >4GB. After this patch, peak RSS in the main process is <500MB.
Notes
Notes: Merged: https://github.com/ruby/ruby/pull/4707
-rw-r--r--test/ruby/test_objectspace.rb2
1 files changed, 2 insertions, 0 deletions
diff --git a/test/ruby/test_objectspace.rb b/test/ruby/test_objectspace.rb
index 7d4a773d4b..24a190b2df 100644
--- a/test/ruby/test_objectspace.rb
+++ b/test/ruby/test_objectspace.rb
@@ -191,6 +191,8 @@ End
assert(false)
rescue my_error
end
+ ensure
+ GC.enable
end
def test_each_object