diff options
author | Yusuke Endoh <[email protected]> | 2021-11-09 17:06:01 +0900 |
---|---|---|
committer | Yusuke Endoh <[email protected]> | 2021-11-10 10:08:30 +0900 |
commit | 5c892da7d7974aeed8e7dd97bb31d2394cc19356 (patch) | |
tree | 4bbfbe05b8c6704ce4b8333b7c53a437e89eea17 /gc.h | |
parent | 0d3898ec7b94b737fd9e0a9df1d0a944a9709564 (diff) |
class.c: descendants must not cause GC until the result array is created
Follow up of 428227472fc6563046d8138aab17f07bef6af753. The previous fix
uses `rb_ary_new_from_values` to create the result array, but it may
trigger the GC.
This second try is to create the result array by `rb_ary_new_capa`
before the second iteration, and assume that `rb_ary_push` does not
trigger GC. This assumption is very fragile, so should be improved in
future.
[Bug #18282] [Feature #14394]
Notes
Notes:
Merged: https://github.com/ruby/ruby/pull/5097
Diffstat (limited to 'gc.h')
0 files changed, 0 insertions, 0 deletions