diff options
| author | mame <mame@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2018-01-15 07:54:24 +0000 |
|---|---|---|
| committer | mame <mame@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2018-01-15 07:54:24 +0000 |
| commit | 84cf66cc6e40e5154d93b8261aecf7581e5075a0 (patch) | |
| tree | edc67c23fff4788486eb7e3d0987ead59752bbd0 | |
| parent | 8ac73660bc962000a89a0e3d7c17a1c48604cd37 (diff) | |
parse.y: Remove unneeded NULL check
There are many usages assuming that bodystmt always returns non-null.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61848 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
| -rw-r--r-- | parse.y | 9 |
1 files changed, 2 insertions, 7 deletions
@@ -2378,13 +2378,8 @@ primary : literal { CMDARG_SET($<val>1); /*%%%*/ - if ($3 == NULL) { - $$ = NEW_NIL(&@$); - } - else { - set_line_body($3, @1.end_pos.lineno); - $$ = NEW_BEGIN($3, &@$); - } + set_line_body($3, @1.end_pos.lineno); + $$ = NEW_BEGIN($3, &@$); nd_set_line($$, @1.end_pos.lineno); /*% $$ = dispatch1(begin, $3); |
