From: matz@... (Yukihiro Matsumoto) Date: 2002-05-24T17:36:38+09:00 Subject: Re: possible bug: stack dump with <<-String, #{...} and large loops Hi, In message "Re: possible bug: stack dump with <<-String, #{...} and large loops" on 02/05/24, nobu.nokada@softhome.net writes: |> I guess `x' must be a dvar, and [ruby-talk:40979] is caused by |> the same reason. | |Patch. Here's mine. --- eval.c 2002/05/21 05:39:18 1.295 +++ eval.c 2002/05/24 08:36:11 @@ -3065,2 +3065,4 @@ while (list) { + NODE *tmp; + if (list->nd_head) { @@ -3075,5 +3077,4 @@ ruby_in_eval++; - list->nd_head = compile(list->nd_head->nd_lit, - ruby_sourcefile, - ruby_sourceline); + tmp = compile(list->nd_head->nd_lit, + ruby_sourcefile, ruby_sourceline); ruby_eval_tree = 0; @@ -3084,3 +3085,4 @@ if (!NIL_P(result)) ruby_errinfo = result; - /* fall through */ + str2 = rb_obj_as_string(rb_eval(self, tmp)); + break; default: