diff --git a/eval.c b/eval.c index 0c10daf0be..8ebfbe93bc 100644 --- a/eval.c +++ b/eval.c @@ -2877,10 +2877,9 @@ rb_eval(VALUE self, NODE *n) case NODE_CASE: { - VALUE val = Qundef; + VALUE val; - if (node->nd_head) - val = rb_eval(self, node->nd_head); + val = rb_eval(self, node->nd_head); node = node->nd_body; while (node) { if (nd_type(node) != NODE_WHEN) { diff --git a/parse.y b/parse.y index 8768ef9c83..7139ee6b42 100644 --- a/parse.y +++ b/parse.y @@ -2605,7 +2605,7 @@ primary : literal | keyword_case opt_terms case_body keyword_end { /*%%%*/ - $$ = NEW_CASE(NULL, $3); + $$ = $3; /*% $$ = dispatch2(case, Qnil, $3); %*/