зеркало из https://github.com/github/ruby.git
Fix flaky test in test_objspace.rb
Ensure that the frozen string is promoted to the old generation by running the GC 4 times.
This commit is contained in:
Родитель
55c9c658bd
Коммит
e8212c55f9
|
@ -281,6 +281,8 @@ class TestObjSpace < Test::Unit::TestCase
|
|||
end
|
||||
|
||||
def test_dump_flags
|
||||
# Ensure that the fstring is promoted to old generation
|
||||
4.times { GC.start }
|
||||
info = ObjectSpace.dump("foo".freeze)
|
||||
assert_match(/"wb_protected":true, "old":true/, info)
|
||||
assert_match(/"fstring":true/, info)
|
||||
|
|
Загрузка…
Ссылка в новой задаче