summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-10-16 06:05:03 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-10-16 06:05:03 +0000
commit04e5c65ff7e97fc611fb2ffe86a42f3aba41f716 (patch)
tree5a8fda40c77616f16168ec83748117e4c1cb1e0d /test
parenteec651a05e3fa316564572c4441f95016ee3daaf (diff)
parse.y: do not use disposed string
* parse.y (parser_here_document): do not append already appended and disposed code fragment. [ruby-dev:48647] [Bug #10392] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47973 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test')
-rw-r--r--test/ripper/test_scanner_events.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/test/ripper/test_scanner_events.rb b/test/ripper/test_scanner_events.rb
index 91903e3dcd..3044d20049 100644
--- a/test/ripper/test_scanner_events.rb
+++ b/test/ripper/test_scanner_events.rb
@@ -708,6 +708,10 @@ class TestRipper::ScannerEvents < Test::Unit::TestCase
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