summaryrefslogtreecommitdiff
path: root/test/ripper
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-12-06 08:29:16 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-12-06 08:29:16 +0000
commitbd0c636211bb3063d9633d955f8807a1d9490048 (patch)
tree29e013105b433de1cb31ab3c9e98da07a7cb6cd9 /test/ripper
parent68a44cd169e5c9c1d2150e1f3932da8c4cb2c013 (diff)
parse.y: flush string content
* parse.y (parser_here_document): flush string content between new line and :string_embexpr. [ruby-core:48703] [Bug #7255] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38235 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/ripper')
-rw-r--r--test/ripper/test_scanner_events.rb7
1 files changed, 7 insertions, 0 deletions
diff --git a/test/ripper/test_scanner_events.rb b/test/ripper/test_scanner_events.rb
index c1b72c2..7186df3 100644
--- a/test/ripper/test_scanner_events.rb
+++ b/test/ripper/test_scanner_events.rb
@@ -676,6 +676,13 @@ class TestRipper::ScannerEvents < Test::Unit::TestCase
scan('tstring_content', "<<""EOS\nhere\ndoc \nEOS \n")
assert_equal ["heredoc\n\tEOS \n"],
scan('tstring_content', "<<""-EOS\nheredoc\n\tEOS \n")
+ bug7255 = '[ruby-core:48703]'
+ assert_equal ["there\n""heredoc", "\n"],
+ scan('tstring_content', "<<""EOS\n""there\n""heredoc\#{foo}\nEOS"),
+ bug7255
+ assert_equal ["there\n""heredoc", "\n"],
+ scan('tstring_content', "<<""EOS\n""there\n""heredoc\#@foo\nEOS"),
+ bug7255
end
def test_heredoc_end