[前][次][番号順一覧][スレッド一覧]

ruby-changes:45023

From: nobu <ko1@a...>
Date: Sat, 17 Dec 2016 07:57:06 +0900 (JST)
Subject: [ruby-changes:45023] nobu:r57095 (trunk): fix r57089

nobu	2016-12-17 07:57:01 +0900 (Sat, 17 Dec 2016)

  New Revision: 57095

  https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=57095

  Log:
    fix r57089
    
    * parse.y (parser_heredoc_identifier): fix multiline here document
      identifier condition.

  Modified files:
    trunk/parse.y
Index: parse.y
===================================================================
--- parse.y	(revision 57094)
+++ parse.y	(revision 57095)
@@ -6433,7 +6433,7 @@ parser_heredoc_identifier(struct parser_ https://github.com/ruby/ruby/blob/trunk/parse.y#L6433
 	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) {

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]