зеркало из https://github.com/github/ruby.git
Remove assumption about object order
The address of objects can't be assumed since a later object may be allocate in a swept slot.
This commit is contained in:
Родитель
4c03eab1aa
Коммит
ecbedf9bf1
|
@ -632,7 +632,13 @@ class TestObjSpace < Test::Unit::TestCase
|
|||
end
|
||||
end
|
||||
|
||||
entry_hash = JSON.parse(test_string_in_dump_all[1])
|
||||
strs = test_string_in_dump_all.reject do |s|
|
||||
s.include?("fstring")
|
||||
end
|
||||
|
||||
assert_equal(1, strs.length)
|
||||
|
||||
entry_hash = JSON.parse(strs[0])
|
||||
|
||||
assert_equal(5, entry_hash["bytesize"], "bytesize is wrong")
|
||||
assert_equal("TEST2", entry_hash["value"], "value is wrong")
|
||||
|
|
Загрузка…
Ссылка в новой задаче