diff options
| author | Yusuke Endoh <mame@ruby-lang.org> | 2025-07-16 19:34:16 +0900 |
|---|---|---|
| committer | Yusuke Endoh <mame@ruby-lang.org> | 2025-07-16 20:14:20 +0900 |
| commit | 830ab2c5b5ea58d1f29cb5e9b3864626b9dc8592 (patch) | |
| tree | 822a0cc3922a5937a0d0744accdb502c902c1e4d | |
| parent | dedf9f5f621f4f9b72b3b40be1753791b7de974e (diff) | |
Add a comment to count_objects to prevent future regression
| -rw-r--r-- | gc.c | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -2507,6 +2507,9 @@ count_objects(int argc, VALUE *argv, VALUE os) } for (size_t i = 0; i <= T_MASK; i++) { + // type_sym can allocate an object, + // so we need to create all key symbols in advance + // not to disturb the result types[i] = type_sym(i); } |
