ruby-changes:40758
From: nagachika <ko1@a...>
Date: Wed, 2 Dec 2015 03:16:13 +0900 (JST)
Subject: [ruby-changes:40758] nagachika:r52837 (ruby_2_2): merge revision(s) 52777: [Backport #11748]
nagachika 2015-12-02 03:15:53 +0900 (Wed, 02 Dec 2015) New Revision: 52837 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=52837 Log: merge revision(s) 52777: [Backport #11748] * parse.y (parser_here_document): store dispatched result of on_tstring_content at the last fragment of a here document. Modified directories: branches/ruby_2_2/ Modified files: branches/ruby_2_2/ChangeLog branches/ruby_2_2/parse.y branches/ruby_2_2/test/ripper/test_sexp.rb branches/ruby_2_2/version.h Index: ruby_2_2/ChangeLog =================================================================== --- ruby_2_2/ChangeLog (revision 52836) +++ ruby_2_2/ChangeLog (revision 52837) @@ -1,3 +1,8 @@ https://github.com/ruby/ruby/blob/trunk/ruby_2_2/ChangeLog#L1 +Wed Dec 2 02:59:42 2015 Nobuyoshi Nakada <nobu@r...> + + * parse.y (parser_here_document): store dispatched result of + on_tstring_content at the last fragment of a here document. + Tue Dec 1 02:52:17 2015 CHIKANAGA Tomoyuki <nagachika@r...> * test/ruby/test_gc.rb: merge partially r52391 to get rid of CI error. Index: ruby_2_2/parse.y =================================================================== --- ruby_2_2/parse.y (revision 52836) +++ ruby_2_2/parse.y (revision 52837) @@ -6742,6 +6742,10 @@ parser_here_document(struct parser_param https://github.com/ruby/ruby/blob/trunk/ruby_2_2/parse.y#L6742 str = STR_NEW3(tok(), toklen(), enc, func); } dispatch_heredoc_end(); +#ifdef RIPPER + str = ripper_new_yylval(ripper_token2eventid(tSTRING_CONTENT), + yylval.val, str); +#endif heredoc_restore(lex_strterm); lex_strterm = NEW_STRTERM(-1, 0, 0); set_yylval_str(str); Index: ruby_2_2/version.h =================================================================== --- ruby_2_2/version.h (revision 52836) +++ ruby_2_2/version.h (revision 52837) @@ -1,10 +1,10 @@ https://github.com/ruby/ruby/blob/trunk/ruby_2_2/version.h#L1 #define RUBY_VERSION "2.2.4" -#define RUBY_RELEASE_DATE "2015-12-01" -#define RUBY_PATCHLEVEL 216 +#define RUBY_RELEASE_DATE "2015-12-02" +#define RUBY_PATCHLEVEL 217 #define RUBY_RELEASE_YEAR 2015 #define RUBY_RELEASE_MONTH 12 -#define RUBY_RELEASE_DAY 1 +#define RUBY_RELEASE_DAY 2 #include "ruby/version.h" Index: ruby_2_2/test/ripper/test_sexp.rb =================================================================== --- ruby_2_2/test/ripper/test_sexp.rb (revision 52836) +++ ruby_2_2/test/ripper/test_sexp.rb (revision 52837) @@ -33,6 +33,11 @@ class TestRipper::Sexp < Test::Unit::Tes https://github.com/ruby/ruby/blob/trunk/ruby_2_2/test/ripper/test_sexp.rb#L33 assert_equal '(?<n>a(b|\g<n>))', search_sexp(:@tstring_content, search_sexp(:regexp_literal, sexp))[1] end + def test_heredoc_content + sexp = Ripper.sexp("<<E\nfoo\nE") + assert_equal "foo\n", search_sexp(:@tstring_content, sexp)[1] + end + def search_sexp(sym, sexp) return sexp if !sexp or sexp[0] == sym sexp.find do |e| Property changes on: ruby_2_2 ___________________________________________________________________ Modified: svn:mergeinfo Merged /trunk:r52777 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/