summaryrefslogtreecommitdiff
path: root/gc.c
diff options
context:
space:
mode:
authormatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>1999-07-15 07:59:59 +0000
committermatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>1999-07-15 07:59:59 +0000
commit86307f52ee1b3c5aa76e2fd6ee118e681dd76905 (patch)
tree4f5675ce901200d4245c6697d4e8d1c224949174 /gc.c
parente12510c502a3c8a81aeda66d1867eb1e760ce533 (diff)
990715
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_3@497 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'gc.c')
-rw-r--r--gc.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/gc.c b/gc.c
index 96974db..f5c0308 100644
--- a/gc.c
+++ b/gc.c
@@ -1133,13 +1133,12 @@ rb_gc_call_finalizer_at_exit()
p = heaps[i]; pend = p + HEAP_SLOTS;
while (p < pend) {
if (BUILTIN_TYPE(p) == T_DATA &&
- DATA_PTR(p) &&
- RANY(p)->as.data.dfree)
+ DATA_PTR(p) && RANY(p)->as.data.dfree) {
(*RANY(p)->as.data.dfree)(DATA_PTR(p));
-#if 0
- else if (BUILTIN_TYPE(p))
- obj_free((VALUE)p);
-#endif
+ }
+ else if (BUILTIN_TYPE(p) == T_FILE) {
+ rb_io_fptr_finalize(RANY(p)->as.file.fptr);
+ }
p++;
}
}