From 31230ec3de8249cb2a0d1fb11ae87853b2d2edd4 Mon Sep 17 00:00:00 2001 From: matz Date: Tue, 4 Jun 2002 07:34:19 +0000 Subject: * string.c (rb_str_aset): should raise error if an indexing string is not found in the receiver. * sprintf.c (rb_f_sprintf): "%d" should convert objects into integers using Integer(). * lib/tempfile.rb (Tempfile::size): added. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@2517 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- parse.y | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'parse.y') diff --git a/parse.y b/parse.y index e43f3fe03..c51e9ed1f 100644 --- a/parse.y +++ b/parse.y @@ -281,7 +281,6 @@ static void top_local_setup(); %% program : { - $$ = ruby_dyna_vars; lex_state = EXPR_BEG; top_local_init(); if ((VALUE)ruby_class == rb_cObject) class_nest = 0; @@ -303,7 +302,6 @@ program : { ruby_eval_tree = block_append(ruby_eval_tree, $2); top_local_setup(); class_nest = 0; - ruby_dyna_vars = $1; } ; @@ -2170,6 +2168,7 @@ yycompile(f, line) { int n; NODE *node = 0; + struct RVarmap *vp, *vars = ruby_dyna_vars; if (!compile_for_eval && rb_safe_level() == 0 && rb_const_defined(rb_cObject, rb_intern("SCRIPT_LINES__"))) { @@ -2210,6 +2209,13 @@ yycompile(f, line) in_def = 0; cur_mid = 0; + vp = ruby_dyna_vars; + ruby_dyna_vars = vars; + while (vp && vp != vars) { + struct RVarmap *tmp = vp; + vp = vp->next; + rb_gc_force_recycle((VALUE)tmp); + } if (n == 0) node = ruby_eval_tree; return node; } -- cgit