diff --git a/ChangeLog b/ChangeLog index a1285dafe2..f07e985e93 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +Wed Jun 28 09:16:18 2006 Yukihiro Matsumoto + + * parse.y (primary): remove meaningless else-only case statement + syntax. + Wed Jun 28 08:08:13 2006 Yukihiro Matsumoto * eval.c (rb_eval): problem to handle else part. [ruby-dev:28873] diff --git a/parse.y b/parse.y index c098fd82b3..9089adff36 100644 --- a/parse.y +++ b/parse.y @@ -2602,14 +2602,6 @@ primary : literal $$ = dispatch2(case, $2, $4); %*/ } - | keyword_case expr_value opt_terms keyword_else compstmt keyword_end - { - /*%%%*/ - $$ = block_append($2, $5); - /*% - $$ = dispatch2(case, $2, dispatch1(else, $5)); - %*/ - } | keyword_case opt_terms case_body keyword_end { /*%%%*/ @@ -2618,14 +2610,6 @@ primary : literal $$ = dispatch2(case, Qnil, $3); %*/ } - | keyword_case opt_terms keyword_else compstmt keyword_end - { - /*%%%*/ - $$ = $4; - /*% - $$ = dispatch2(case, Qnil, dispatch1(else, $4)); - %*/ - } | keyword_for for_var keyword_in {COND_PUSH(1);} expr_value do {COND_POP();} compstmt keyword_end