mirror of
https://github.com/ruby/ruby.git
synced 2025-09-15 16:44:01 +02:00
matz
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1081 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
8369164408
commit
ceec42bf8c
9 changed files with 129 additions and 85 deletions
19
eval.c
19
eval.c
|
@ -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();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue