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

ruby-changes:35922

From: nagachika <ko1@a...>
Date: Sun, 19 Oct 2014 03:21:54 +0900 (JST)
Subject: [ruby-changes:35922] nagachika:r48003 (ruby_2_1): merge revision(s) r47973: [Backport #10392]

nagachika	2014-10-19 03:21:39 +0900 (Sun, 19 Oct 2014)

  New Revision: 48003

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

  Log:
    merge revision(s) r47973: [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_1/
  Modified files:
    branches/ruby_2_1/ChangeLog
    branches/ruby_2_1/parse.y
    branches/ruby_2_1/test/ripper/test_scanner_events.rb
    branches/ruby_2_1/version.h
Index: ruby_2_1/ChangeLog
===================================================================
--- ruby_2_1/ChangeLog	(revision 48002)
+++ ruby_2_1/ChangeLog	(revision 48003)
@@ -1,3 +1,8 @@ https://github.com/ruby/ruby/blob/trunk/ruby_2_1/ChangeLog#L1
+Sun Oct 19 03:13:38 2014  Nobuyoshi Nakada  <nobu@r...>
+
+	* parse.y (parser_here_document): do not append already appended
+	  and disposed code fragment.  [ruby-dev:48647] [Bug #10392]
+
 Thu Oct 16 22:10:11 2014  Nobuyoshi Nakada  <nobu@r...>
 
 	* ext/stringio/stringio.c (strio_write): ASCII-8BIT StringIO
Index: ruby_2_1/parse.y
===================================================================
--- ruby_2_1/parse.y	(revision 48002)
+++ ruby_2_1/parse.y	(revision 48003)
@@ -6547,7 +6547,10 @@ parser_here_document(struct parser_param https://github.com/ruby/ruby/blob/trunk/ruby_2_1/parse.y#L6547
 	    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_1/version.h
===================================================================
--- ruby_2_1/version.h	(revision 48002)
+++ ruby_2_1/version.h	(revision 48003)
@@ -1,10 +1,10 @@ https://github.com/ruby/ruby/blob/trunk/ruby_2_1/version.h#L1
 #define RUBY_VERSION "2.1.4"
-#define RUBY_RELEASE_DATE "2014-10-16"
-#define RUBY_PATCHLEVEL 259
+#define RUBY_RELEASE_DATE "2014-10-19"
+#define RUBY_PATCHLEVEL 260
 
 #define RUBY_RELEASE_YEAR 2014
 #define RUBY_RELEASE_MONTH 10
-#define RUBY_RELEASE_DAY 16
+#define RUBY_RELEASE_DAY 19
 
 #include "ruby/version.h"
 
Index: ruby_2_1/test/ripper/test_scanner_events.rb
===================================================================
--- ruby_2_1/test/ripper/test_scanner_events.rb	(revision 48002)
+++ ruby_2_1/test/ripper/test_scanner_events.rb	(revision 48003)
@@ -708,6 +708,10 @@ class TestRipper::ScannerEvents < Test:: https://github.com/ruby/ruby/blob/trunk/ruby_2_1/test/ripper/test_scanner_events.rb#L708
     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_1
___________________________________________________________________
Modified: svn:mergeinfo
   Merged /trunk:r47973


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

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