diff options
| author | Nobuyoshi Nakada <nobu@ruby-lang.org> | 2023-03-19 01:35:21 +0900 |
|---|---|---|
| committer | Nobuyoshi Nakada <nobu@ruby-lang.org> | 2023-03-19 01:35:21 +0900 |
| commit | 67dd52d59cde0d2f1ebb3e299b605ed239b59f5b (patch) | |
| tree | 6cc6d456897018157e6d5ec256f16885dfa6a118 /test/ruby | |
| parent | e8e7ff1333b9b32d72a1d8f789a186d58c811420 (diff) | |
[Bug #19539] Match heredoc identifier from end of line
Not to ignore leading spaces in indented heredoc identifier.
Notes
Notes:
Merged: https://github.com/ruby/ruby/pull/7566
Diffstat (limited to 'test/ruby')
| -rw-r--r-- | test/ruby/test_parse.rb | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/test/ruby/test_parse.rb b/test/ruby/test_parse.rb index 2f2c062ceb..49b25fcaf0 100644 --- a/test/ruby/test_parse.rb +++ b/test/ruby/test_parse.rb @@ -681,6 +681,16 @@ FOO eval "x = <<""FOO\r\n1\r\nFOO" end assert_equal("1\n", x) + + assert_nothing_raised do + x = eval "<<' FOO'\n""[Bug #19539]\n"" FOO\n" + end + assert_equal("[Bug #19539]\n", x) + + assert_nothing_raised do + x = eval "<<-' FOO'\n""[Bug #19539]\n"" FOO\n" + end + assert_equal("[Bug #19539]\n", x) end def test_magic_comment |
