aboutsummaryrefslogtreecommitdiffstats
path: root/parse.y
diff options
context:
space:
mode:
authorNobuyoshi Nakada <nobu@ruby-lang.org>2019-06-13 22:19:47 +0900
committerNobuyoshi Nakada <nobu@ruby-lang.org>2019-06-13 22:19:47 +0900
commitaa7211836b769231a2a8ef6b6ec2fd0ec882ef29 (patch)
treee0a6bf725ecd79bdc2122a6c44f932d6cc8f0469 /parse.y
parent043f010c28e82ea38978bf8ed885416f133b5b75 (diff)
downloadruby-aa7211836b769231a2a8ef6b6ec2fd0ec882ef29.tar.gz
Continue to the next line beginning with a pipeline
Diffstat (limited to 'parse.y')
-rw-r--r--parse.y3
1 files changed, 2 insertions, 1 deletions
diff --git a/parse.y b/parse.y
index a31139fbef..58f0e4b615 100644
--- a/parse.y
+++ b/parse.y
@@ -8678,10 +8678,11 @@ parser_yylex(struct parser_params *p)
case '\13': /* '\v' */
space_seen = 1;
break;
+ case '|':
case '&':
case '.': {
dispatch_delayed_token(p, tIGNORED_NL);
- if (peek(p, '.') == (c == '&')) {
+ if (c == '|' ? peek(p, '>') : (peek(p, '.') == (c == '&'))) {
pushback(p, c);
dispatch_scan_event(p, tSP);
goto retry;