Project

General

Profile

« Previous | Next » 

Revision 5c892da7

Added by mame (Yusuke Endoh) over 3 years ago

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]