summaryrefslogtreecommitdiff
path: root/parse.y
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2016-12-16 22:57:01 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2016-12-16 22:57:01 +0000
commit9c8981266417e8755c1e904c7422a39ce04b66f9 (patch)
tree1f0c488a3110217e1ec6ae365c173a14e8edb651 /parse.y
parent681c22eb09bd2f57dad5140b78d7df8d352c3aaa (diff)
fix r57089
* parse.y (parser_heredoc_identifier): fix multiline here document identifier condition. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57095 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'parse.y')
-rw-r--r--parse.y2
1 files changed, 1 insertions, 1 deletions
diff --git a/parse.y b/parse.y
index daa0fe1f96..85cbc37331 100644
--- a/parse.y
+++ b/parse.y
@@ -6433,7 +6433,7 @@ parser_heredoc_identifier(struct parser_params *parser)
term = c;
while ((c = nextc()) != -1 && c != term) {
if (tokadd_mbchar(c) == -1) return 0;
- if (c == '\n') newline = 1;
+ if (!newline && c == '\n') newline = 1;
else if (newline) newline = 2;
}
if (c == -1) {