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

parse.y: suppress warning

* parse.y (parser_append_options): explicitly pass $; when auto
  splitting, to suppress the warning for non-nil $;.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67608 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
nobu 2019-04-18 22:24:03 +00:00
parent 396c1846fa
commit c3c4e411eb

View file

@ -11777,9 +11777,10 @@ parser_append_options(struct parser_params *p, NODE *node)
if (p->do_loop) {
if (p->do_split) {
NODE *args = NEW_LIST(NEW_GVAR(rb_intern("$;"), LOC), LOC);
NODE *split = NEW_GASGN(rb_intern("$F"),
NEW_CALL(NEW_GVAR(idLASTLINE, LOC),
rb_intern("split"), 0, LOC),
rb_intern("split"), args, LOC),
LOC);
node = block_append(p, split, node);
}