diff options
author | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2000-12-27 05:59:03 +0000 |
---|---|---|
committer | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2000-12-27 05:59:03 +0000 |
commit | 6202f851c777a8327491ddca8f2df39b20ff9b5a (patch) | |
tree | 6f9e1b9a22f7b1f58a4d23e6e44b3c3cff16c6b0 /eval.c | |
parent | 317996699cf5ce975701fa3becdb03dc1aaf0fb7 (diff) | |
download | ruby-6202f851c777a8327491ddca8f2df39b20ff9b5a.tar.gz ruby-6202f851c777a8327491ddca8f2df39b20ff9b5a.tar.xz ruby-6202f851c777a8327491ddca8f2df39b20ff9b5a.zip |
matz
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@1081 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'eval.c')
-rw-r--r-- | eval.c | 19 |
1 files changed, 10 insertions, 9 deletions
@@ -1982,7 +1982,7 @@ rb_eval(self, n) /* nodes for speed-up(default match) */ case NODE_MATCH: - result = rb_reg_match2(node->nd_head->nd_lit); + result = rb_reg_match2(node->nd_lit); break; /* nodes for speed-up(literal match) */ @@ -3558,17 +3558,18 @@ rb_yield_0(val, self, klass, acheck) pop_state: POP_ITER(); POP_CLASS(); - if ((block->flags & BLOCK_D_SCOPE) && + if (ruby_dyna_vars && (block->flags & BLOCK_D_SCOPE) && !FL_TEST(ruby_dyna_vars, DVAR_DONT_RECYCLE)) { - struct RVarmap *vars = ruby_dyna_vars; + struct RVarmap *vars, *tmp; - while (vars && vars->id != 0) { - struct RVarmap *tmp = vars->next; - rb_gc_force_recycle((VALUE)vars); - vars = tmp; - } - if (ruby_dyna_vars && ruby_dyna_vars->id == 0) { + if (ruby_dyna_vars->id == 0) { + vars = ruby_dyna_vars->next; rb_gc_force_recycle((VALUE)ruby_dyna_vars); + while (vars && vars->id != 0) { + tmp = vars->next; + rb_gc_force_recycle((VALUE)vars); + vars = tmp; + } } } POP_VARS(); |