From: ts Date: 2002-05-27T00:35:45+09:00 Subject: Re: possible bug: stack dump with <<-String, #{...} and large loops >>>>> "n" == nobu nokada writes: n> Like this? Yes, but I really hate the following line (I hope that nobody on this list has seen this :-))) n> + ruby_eval_tree = block_append(ruby_eval_tree, n> + NEW_DASGN(0, NEW_LIT(0))); The other solution pigeon% diff -ub eval.c.old eval.c --- eval.c.old Sun May 26 17:27:57 2002 +++ eval.c Sun May 26 17:10:14 2002 @@ -3060,8 +3060,12 @@ { VALUE str, str2; NODE *list = node->nd_next; + int state; str = rb_str_new3(node->nd_lit); + rb_dvar_push(0, 0); + PUSH_TAG(PROT_NONE); + if ((state = EXEC_TAG()) == 0) { while (list) { if (list->nd_head) { switch (nd_type(list->nd_head)) { @@ -3092,6 +3096,11 @@ } list = list->nd_next; } + } + POP_TAG(); + ruby_dyna_vars = ruby_dyna_vars->next; + if (state) JUMP_TAG(state); + switch (nd_type(node)) { case NODE_DREGX: result = rb_reg_new(RSTRING(str)->ptr, RSTRING(str)->len, pigeon% must work no ? Guy Decoux