summaryrefslogtreecommitdiff
path: root/array.c
diff options
context:
space:
mode:
authorPeter Zhu <peter@peterzhu.ca>2021-11-05 09:51:53 -0400
committerPeter Zhu <peter@peterzhu.ca>2021-11-08 14:05:54 -0500
commitaeae6e2842e1702dfb89b8ae69b48c4f5f64c662 (patch)
tree33a7c7e23bf109123a77c7eb644e66e9bd44d75d /array.c
parentaa5bccfc65cf47a10d72cefa4bc2ee097f135b4c (diff)
[Feature #18290] Remove all usages of rb_gc_force_recycle
This commit removes usages of rb_gc_force_recycle since it is a burden to maintain and makes changes to the GC difficult.
Notes
Notes: Merged: https://github.com/ruby/ruby/pull/4363
Diffstat (limited to 'array.c')
-rw-r--r--array.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/array.c b/array.c
index cef48d3336..be09151f43 100644
--- a/array.c
+++ b/array.c
@@ -514,13 +514,9 @@ rb_ary_decrement_share(VALUE shared_root)
{
if (shared_root) {
long num = ARY_SHARED_ROOT_REFCNT(shared_root) - 1;
- if (num == 0) {
- rb_ary_free(shared_root);
- rb_gc_force_recycle(shared_root);
- }
- else if (num > 0) {
+ if (num > 0) {
ARY_SET_SHARED_ROOT_REFCNT(shared_root, num);
- }
+ }
}
}