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

ruby-changes:35908

From: usa <ko1@a...>
Date: Fri, 17 Oct 2014 13:23:24 +0900 (JST)
Subject: [ruby-changes:35908] usa:r47989 (ruby_2_0_0): merge revision(s) 47973: [Backport #10392]

usa	2014-10-17 13:23:06 +0900 (Fri, 17 Oct 2014)

  New Revision: 47989

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

  Log:
    merge revision(s) 47973: [Backport #10392]
    
    * parse.y (parser_here_document): do not append already appended
      and disposed code fragment.  [ruby-dev:48647] [Bug #10392]

  Modified directories:
    branches/ruby_2_0_0/
  Modified files:
    branches/ruby_2_0_0/ChangeLog
    branches/ruby_2_0_0/parse.y
    branches/ruby_2_0_0/test/ripper/test_scanner_events.rb
    branches/ruby_2_0_0/version.h
Index: ruby_2_0_0/ChangeLog
===================================================================
--- ruby_2_0_0/ChangeLog	(revision 47988)
+++ ruby_2_0_0/ChangeLog	(revision 47989)
@@ -1,3 +1,8 @@ https://github.com/ruby/ruby/blob/trunk/ruby_2_0_0/ChangeLog#L1
+Fri Oct 17 13:22:17 2014  Nobuyoshi Nakada  <nobu@r...>
+
+	* parse.y (parser_here_document): do not append already appended
+	  and disposed code fragment.  [ruby-dev:48647] [Bug #10392]
+
 Fri Oct 17 13:19:44 2014  Nobuyoshi Nakada  <nobu@r...>
 
 	* ext/stringio/stringio.c (strio_write): ASCII-8BIT StringIO
Index: ruby_2_0_0/parse.y
===================================================================
--- ruby_2_0_0/parse.y	(revision 47988)
+++ ruby_2_0_0/parse.y	(revision 47989)
@@ -6458,7 +6458,10 @@ parser_here_document(struct parser_param https://github.com/ruby/ruby/blob/trunk/ruby_2_0_0/parse.y#L6458
 	    if (pend < lex_pend) rb_str_cat(str, "\n", 1);
 	    lex_goto_eol(parser);
 	    if (nextc() == -1) {
-		if (str) dispose_string(str);
+		if (str) {
+		    dispose_string(str);
+		    str = 0;
+		}
 		goto error;
 	    }
 	} while (!whole_match_p(eos, len, indent));
Index: ruby_2_0_0/version.h
===================================================================
--- ruby_2_0_0/version.h	(revision 47988)
+++ ruby_2_0_0/version.h	(revision 47989)
@@ -1,6 +1,6 @@ https://github.com/ruby/ruby/blob/trunk/ruby_2_0_0/version.h#L1
 #define RUBY_VERSION "2.0.0"
 #define RUBY_RELEASE_DATE "2014-10-17"
-#define RUBY_PATCHLEVEL 589
+#define RUBY_PATCHLEVEL 590
 
 #define RUBY_RELEASE_YEAR 2014
 #define RUBY_RELEASE_MONTH 10
Index: ruby_2_0_0/test/ripper/test_scanner_events.rb
===================================================================
--- ruby_2_0_0/test/ripper/test_scanner_events.rb	(revision 47988)
+++ ruby_2_0_0/test/ripper/test_scanner_events.rb	(revision 47989)
@@ -683,6 +683,10 @@ class TestRipper::ScannerEvents < Test:: https://github.com/ruby/ruby/blob/trunk/ruby_2_0_0/test/ripper/test_scanner_events.rb#L683
     assert_equal ["there\n""heredoc", "\n"],
                  scan('tstring_content', "<<""EOS\n""there\n""heredoc\#@foo\nEOS"),
                  bug7255
+    bug10392 = '[ruby-dev:48647] [Bug #10392]'
+    assert_equal [" E\n\n"],
+                 scan('tstring_content', "<<""'E'\n E\n\n"),
+                 bug10392
   end
 
   def test_heredoc_end

Property changes on: ruby_2_0_0
___________________________________________________________________
Modified: svn:mergeinfo
   Merged /trunk:r47973


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

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