diff options
-rw-r--r-- | ChangeLog | 4 | ||||
-rw-r--r-- | gc.c | 3 |
2 files changed, 6 insertions, 1 deletions
@@ -1,3 +1,7 @@ +Tue Nov 20 16:24:31 2007 Tanaka Akira <akr@fsij.org> + + * gc.c (gc_mark_children): obj->as.file.fptr may be 0 for T_FILE. + Tue Nov 20 15:09:00 2007 Nobuyoshi Nakada <nobu@ruby-lang.org> * parse.y (parser_read_escape): has8bit flag may be set with control @@ -1081,7 +1081,8 @@ gc_mark_children(VALUE ptr, int lev) break; case T_FILE: - gc_mark(obj->as.file.fptr->tied_io_for_writing, lev); + if (obj->as.file.fptr) + gc_mark(obj->as.file.fptr->tied_io_for_writing, lev); break; case T_REGEXP: |