summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2016-07-21 21:12:53 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2016-07-21 21:12:53 +0000
commit2a32bd36eab71436af38a84b2bbc8daa19a00637 (patch)
treebc62ccf10b7c3261129b3eb152c25627440a32eb
parent0b8590724d28226e4cbb8bcd80ac9edce3cce11c (diff)
gc.c: set finalizing
* gc.c (gc_start_internal, rb_gc_start): set finalizing flag whenever calling deferred finalizers not to recurse. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55720 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--ChangeLog5
-rw-r--r--gc.c4
2 files changed, 7 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index 20569db97f..4791195bfc 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+Fri Jul 22 06:12:51 2016 Nobuyoshi Nakada <nobu@ruby-lang.org>
+
+ * gc.c (gc_start_internal, rb_gc_start): set finalizing flag
+ whenever calling deferred finalizers not to recurse.
+
Thu Jul 21 22:26:40 2016 SHIBATA Hiroshi <hsbt@ruby-lang.org>
* missing/strl{cat,cpy}.c: Update latest upstream files.
diff --git a/gc.c b/gc.c
index e72006898c..fe2c225f23 100644
--- a/gc.c
+++ b/gc.c
@@ -6580,7 +6580,7 @@ gc_start_internal(int argc, VALUE *argv, VALUE self)
}
garbage_collect(objspace, full_mark, immediate_mark, immediate_sweep, GPR_FLAG_METHOD);
- if (!finalizing) finalize_deferred(objspace);
+ gc_finalize_deferred(objspace);
return Qnil;
}
@@ -6597,7 +6597,7 @@ rb_gc(void)
{
rb_objspace_t *objspace = &rb_objspace;
garbage_collect(objspace, TRUE, TRUE, TRUE, GPR_FLAG_CAPI);
- if (!finalizing) finalize_deferred(objspace);
+ gc_finalize_deferred(objspace);
}
int