diff options
author | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2006-02-13 04:53:22 +0000 |
---|---|---|
committer | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2006-02-13 04:53:22 +0000 |
commit | 7f7236025953af6e0308995e073f9babbe149473 (patch) | |
tree | 9bf6db5c720b6039d2f913fbfa466ff46d221ca3 /gc.c | |
parent | c37c5419d251c5e72d413a4759eac2a34c1de3e4 (diff) | |
download | bundler-7f7236025953af6e0308995e073f9babbe149473.tar.gz |
* parse.y (parser_parse_string): mention "regexp" in a error
message. a patch from Mauricio Fernandez <mfp at acm.org>
[ruby-core:07340]
* eval.c (rb_f_autoload): check if ruby_cbase is nil (during
instance_eval for objects cannot have singleton classes,
e.g. fixnums and symbols). [ruby-dev:28178]
* gc.c (rb_gc_call_finalizer_at_exit): turn on during_gc while
invoking finalizers.
* gc.c (rb_gc_finalize_deferred): ditto.
* io.c (rb_write_error2): use fwrite(3) if rb_stderr is not
updated or is already freed. [ruby-dev:28313]
* eval.c (error_line): include the class name of a surrounding
method in error position description.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@9918 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'gc.c')
-rw-r--r-- | gc.c | 7 |
1 files changed, 6 insertions, 1 deletions
@@ -772,7 +772,6 @@ gc_mark_children(VALUE ptr, int lev) case NODE_IF: /* 1,2,3 */ case NODE_FOR: case NODE_ITER: - case NODE_CREF: case NODE_WHEN: case NODE_MASGN: case NODE_RESCUE: @@ -792,6 +791,7 @@ gc_mark_children(VALUE ptr, int lev) case NODE_CALL: case NODE_DEFS: case NODE_OP_ASGN1: + case NODE_CREF: gc_mark((VALUE)obj->as.node.u1.node, lev); /* fall through */ case NODE_SUPER: /* 3 */ @@ -1831,11 +1831,13 @@ rb_gc_finalize_deferred(void) { RVALUE *p = deferred_final_list; + during_gc++; deferred_final_list = 0; if (p) { finalize_list(p); } free_unused_heaps(); + during_gc = 0; } void @@ -1844,6 +1846,8 @@ rb_gc_call_finalizer_at_exit(void) RVALUE *p, *pend; int i; + /* finalizers are part of garbage collection */ + during_gc++; /* run finalizers */ if (need_call_final) { p = deferred_final_list; @@ -1884,6 +1888,7 @@ rb_gc_call_finalizer_at_exit(void) p++; } } + during_gc = 0; } /* |