summaryrefslogtreecommitdiff
path: root/test/ruby
diff options
context:
space:
mode:
authorNobuyoshi Nakada <nobu@ruby-lang.org>2023-01-02 00:27:25 +0900
committerNobuyoshi Nakada <nobu@ruby-lang.org>2023-01-02 16:12:08 +0900
commit3becc4a105bcf873fdc6e83c2a957f73718c5084 (patch)
tree05cdec0078f36a1695dd67eb58bcf30fcb4f9c38 /test/ruby
parent1912bf54613f2e60e96a15906be0684a99ac9553 (diff)
[Bug #19291] Rewind to the previous line
When rewinding looking ahead after newline token, also reset the last line string, the pointers to it, and the location, not only the line number.
Notes
Notes: Merged: https://github.com/ruby/ruby/pull/7054
Diffstat (limited to 'test/ruby')
-rw-r--r--test/ruby/test_parse.rb1
1 files changed, 1 insertions, 0 deletions
diff --git a/test/ruby/test_parse.rb b/test/ruby/test_parse.rb
index 4488ea620e..2f2c062ceb 100644
--- a/test/ruby/test_parse.rb
+++ b/test/ruby/test_parse.rb
@@ -14,6 +14,7 @@ class TestParse < Test::Unit::TestCase
def test_error_line
assert_syntax_error('------,,', /\n\z/, 'Message to pipe should end with a newline')
+ assert_syntax_error("{hello\n world}", /hello/)
end
def test_else_without_rescue