mirror of
https://github.com/ruby/ruby.git
synced 2025-09-23 12:33:56 +02:00
Change heap walking to be safe for object allocation
This commit is contained in:
parent
f9f13a4f6d
commit
b25361f731
Notes:
git
2021-03-25 03:31:33 +09:00
2 changed files with 95 additions and 46 deletions
|
@ -233,4 +233,11 @@ End
|
|||
assert_kind_of(meta, sclass)
|
||||
assert_include(ObjectSpace.each_object(meta).to_a, sclass)
|
||||
end
|
||||
|
||||
def test_each_object_with_allocation
|
||||
assert_normal_exit(<<-End)
|
||||
list = []
|
||||
ObjectSpace.each_object { |o| list << Object.new }
|
||||
End
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue