1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

parse.y: fix for old compilers

* parse.y (arg_value): initialization of aggregation type with
  non-constant values is not allowed in C89.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61068 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
nobu 2017-12-07 04:12:42 +00:00
parent 185133fd43
commit db2d28b08e

View file

@ -4998,7 +4998,9 @@ assoc : arg_value tASSOC arg_value
| tSTRING_BEG string_contents tLABEL_END arg_value
{
/*%%%*/
YYLTYPE location = {@1.first_loc, @3.last_loc};
YYLTYPE location;
location.first_loc = @1.first_loc;
location.last_loc = @3.last_loc;
$$ = list_append(new_list(dsym_node($2, &location), &location), $4, &@$);
/*%
$$ = dispatch2(assoc_new, dispatch1(dyna_symbol, $2), $4);