diff options
-rw-r--r-- | ChangeLog | 4 | ||||
-rw-r--r-- | gc.c | 3 |
2 files changed, 6 insertions, 1 deletions
@@ -1,3 +1,7 @@ +Thu Oct 28 23:31:39 2010 Koichi Sasada <ko1@atdot.net> + + * gc.c (before_gc_sweep, run_final): fix decrement timing of final_num. + Thu Oct 28 20:11:30 2010 NARUSE, Yui <naruse@ruby-lang.org> * tool/enc-unicode.rb, @@ -2026,7 +2026,6 @@ before_gc_sweep(rb_objspace_t *objspace) } objspace->heap.sweep_slots = heaps; objspace->heap.free_num = 0; - objspace->heap.final_num = 0; } static void @@ -2871,6 +2870,8 @@ run_final(rb_objspace_t *objspace, VALUE obj) RUBY_DATA_FUNC free_func = 0; st_data_t key, table; + objspace->heap.final_num--; + objid = rb_obj_id(obj); /* make obj into id */ RBASIC(obj)->klass = 0; |