From d2fbacfcf976a58e545c91d740b102048c67fc7b Mon Sep 17 00:00:00 2001 From: matz Date: Mon, 26 Feb 2001 05:29:06 +0000 Subject: * eval.c (proc_call): should not modify ruby_block->frame.iter based on ruby_frame->iter altered by PUSH_ITER(). * eval.c (rb_thread_fd_close): should save current context before raising exception. * io.c (set_stdin): preserve original stdin. * io.c (set_outfile): preserve original stdout/stderr. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@1219 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- parse.y | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) (limited to 'parse.y') diff --git a/parse.y b/parse.y index 4f6095b6f..7e4f1a335 100644 --- a/parse.y +++ b/parse.y @@ -1271,7 +1271,12 @@ primary : literal cref_pop(); class_nest--; } - | kCLASS tLSHFT expr term + | kCLASS tLSHFT expr + { + $$ = in_def; + in_def = 0; + } + term { $$ = in_single; in_single = 0; @@ -1279,10 +1284,6 @@ primary : literal cref_push(); local_push(); } - { - $$ = in_def; - in_def = 0; - } compstmt kEND { @@ -1291,8 +1292,8 @@ primary : literal local_pop(); cref_pop(); class_nest--; - in_single = $5; - in_def = $6; + in_def = $4; + in_single = $6; } | kMODULE cname { -- cgit