summaryrefslogtreecommitdiff
path: root/test/ripper
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-03-26 07:13:43 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-03-26 07:13:43 +0000
commitcb64ef240befe2cb8a01a0fe2bd1f7d6e29867bf (patch)
tree49d111e3ac50946cf5ab514ac6ba49fc81b6bd7e /test/ripper
parent07e4aa67e1e46b895b567d1427bf369771253d1a (diff)
parse.y: unterminated content token
* parse.y (parser_parse_string): defer the end token to next reading, to yield tSTRING_CONTENT with the unterminated content. [Bug #13363] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58138 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/ripper')
-rw-r--r--test/ripper/test_scanner_events.rb3
1 files changed, 3 insertions, 0 deletions
diff --git a/test/ripper/test_scanner_events.rb b/test/ripper/test_scanner_events.rb
index 8cf7ac1220..027d56d1e6 100644
--- a/test/ripper/test_scanner_events.rb
+++ b/test/ripper/test_scanner_events.rb
@@ -109,6 +109,9 @@ class TestRipper::ScannerEvents < Test::Unit::TestCase
[[3, 0], :on_heredoc_end, "EOS"]
],
Ripper.lex("<<~EOS\n heredoc\nEOS")
+ assert_equal [[[1, 0], :on_tstring_beg, "'"],
+ [[1, 1], :on_tstring_content, "foo"]],
+ Ripper.lex("'foo")
end
def test_location