diff --git a/test/test_weakref.rb b/test/test_weakref.rb index 97274c1f3f..0f943cdf12 100644 --- a/test/test_weakref.rb +++ b/test/test_weakref.rb @@ -2,9 +2,11 @@ require 'test/unit' require 'weakref' class TestWeakRef < Test::Unit::TestCase - def make_weakref + def make_weakref(level = 10) obj = Object.new - return WeakRef.new(obj), obj.to_s + str = obj.to_s + level.times {obj = WeakRef.new(obj)} + return WeakRef.new(obj), str end def test_ref