8000 merge revision(s) r47973: [Backport #10392] · github/ruby@3ec2fe7 · GitHub
[go: up one dir, main page]

Skip to content

Commit 3ec2fe7

Browse files
committed
merge revision(s) r47973: [Backport ruby#10392]
* parse.y (parser_here_document): do not append already appended and disposed code fragment. [ruby-dev:48647] [Bug ruby#10392] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_1@48003 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
1 parent 2d17e3a commit 3ec2fe7

File tree

4 files changed

+16
-4
lines changed

4 files changed

+16
-4
lines changed

ChangeLog

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
Sun Oct 19 03:13:38 2014 Nobuyoshi Nakada <nobu@ruby-lang.org>
2+
3+
* parse.y (parser_here_document): do not append already appended
4+
and disposed code fragment. [ruby-dev:48647] [Bug #10392]
5+
16
Thu Oct 16 22:10:11 2014 Nobuyoshi Nakada <nobu@ruby-lang.org>
27

38
* ext/stringio/stringio.c (strio_write): ASCII-8BIT StringIO

parse.y

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6547,7 +6547,10 @@ parser_here_document(struct parser_params *parser, NODE *here)
65476547
if (pend < lex_pend) rb_str_cat(str, "\n", 1);
65486548
lex_goto_eol(parser);
65496549
if (nextc() == -1) {
6550-
if (str) dispose_string(str);
6550+
if (str) {
6551+
dispose_string(str);
6552+
str = 0;
6553+
}
65516554
goto error;
65526555
}
65536556
} while (!whole_match_p(eos, len, indent));

test/ripper/test_scanner_events.rb

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -708,6 +708,10 @@ def test_tstring_content_HEREDOC
708708
assert_equal ["there\n""heredoc", "\n"],
709709
scan('tstring_content', "<<""EOS\n""there\n""heredoc\#@foo\nEOS"),
710710
bug7255
711+
bug10392 = '[ruby-dev:48647] [Bug #10392]'
712+
assert_equal [" E\n\n"],
713+
scan('tstring_content', "<<""'E'\n E\n\n"),
714+
bug10392
711715
end
712716

713717
def test_heredoc_end

version.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
#define RUBY_VERSION "2.1.4"
2-
#define RUBY_RELEASE_DATE "2014-10-16"
3-
#define RUBY_PATCHLEVEL 259
2+
#define RUBY_RELEASE_DATE "2014-10-19"
3+
#define RUBY_PATCHLEVEL 260
44

55
#define RUBY_RELEASE_YEAR 2014
66
#define RUBY_RELEASE_MONTH 10
7-
#define RUBY_RELEASE_DAY 16
7+
#define RUBY_RELEASE_DAY 19
88

99
#include "ruby/version.h"
1010

0 commit comments

Comments
 (0)
0