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

Reuse opt_arg_append function

This commit is contained in:
S.H 2022-09-14 23:10:21 +09:00 committed by GitHub
parent f512df7398
commit 960db13c47
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
Notes: git 2022-09-14 23:10:45 +09:00
Merged: https://github.com/ruby/ruby/pull/6373

Merged-By: nobu <nobu@ruby-lang.org>

View file

@ -10561,13 +10561,7 @@ static NODE *
kwd_append(NODE *kwlist, NODE *kw)
{
if (kwlist) {
NODE *kws = kwlist;
kws->nd_loc.end_pos = kw->nd_loc.end_pos;
while (kws->nd_next) {
kws = kws->nd_next;
kws->nd_loc.end_pos = kw->nd_loc.end_pos;
}
kws->nd_next = kw;
opt_arg_append(kwlist, kw);
}
return kwlist;
}