From 760878b4242ae20a7b10f7a8f49d3875e0201aad Mon Sep 17 00:00:00 2001 From: matz Date: Wed, 20 Mar 2002 09:43:15 +0000 Subject: * eval.c (is_defined): should check receiver only once. * eval.c (is_defined): should handle NODE_NEWLINE. * file.c (rb_file_s_expand_path): memory leak fixed. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2229 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- parse.y | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'parse.y') diff --git a/parse.y b/parse.y index 01eef2ed0c..db8115eee5 100644 --- a/parse.y +++ b/parse.y @@ -5021,12 +5021,10 @@ local_id(id) return Qfalse; } -static VALUE last_dyna_vars = 0; - static void top_local_init() { - local_push(1); + local_push(); lvtbl->cnt = ruby_scope->local_tbl?ruby_scope->local_tbl[0]:0; if (lvtbl->cnt > 0) { lvtbl->tbl = ALLOC_N(ID, lvtbl->cnt+3); @@ -5187,8 +5185,7 @@ Init_sym() { sym_tbl = st_init_strtable_with_size(200); sym_rev_tbl = st_init_numtable_with_size(200); - rb_global_variable(&lex_lastline); - rb_global_variable(&last_dyna_vars); + rb_global_variable((VALUE*)&lex_lastline); } static ID last_id = LAST_TOKEN; -- cgit v1.2.3