summaryrefslogtreecommitdiff
path: root/test/ruby/test_gc_compact.rb
diff options
context:
space:
mode:
Diffstat (limited to 'test/ruby/test_gc_compact.rb')
-rw-r--r--test/ruby/test_gc_compact.rb6
1 files changed, 5 insertions, 1 deletions
diff --git a/test/ruby/test_gc_compact.rb b/test/ruby/test_gc_compact.rb
index 888f0ad96e..784eb07a43 100644
--- a/test/ruby/test_gc_compact.rb
+++ b/test/ruby/test_gc_compact.rb
@@ -23,7 +23,11 @@ class TestGCCompact < Test::Unit::TestCase
end
def big_list
- 1000.times.map { Object.new } # likely next to each other
+ 1000.times.map {
+ # try to make some empty slots by allocating an object and discarding
+ Object.new
+ Object.new
+ } # likely next to each other
end
# Find an object that's allocated in a slot that had a previous