diff options
| author | nagachika <nagachika@ruby-lang.org> | 2024-08-18 10:52:06 +0900 |
|---|---|---|
| committer | nagachika <nagachika@ruby-lang.org> | 2024-08-18 10:52:06 +0900 |
| commit | a8a25291447e3630d455e82851ca58fc8ac372ec (patch) | |
| tree | e2927b57a23ba942ee876214d7b2f35d304edc49 /test | |
| parent | 0f2f6b31aa6433fd800f0621b5bedbaf0da12a6f (diff) | |
merge revision(s) 97449338d6cb42d9dd7c9ca61550616e7e6b6ef6: [Backport #20649]
[Bug #20649] Allow `nil` as 2nd argument of `assign_error`
Fallback to the last token element in that case, for the backward
compatibilities.
Diffstat (limited to 'test')
| -rw-r--r-- | test/ripper/test_scanner_events.rb | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/test/ripper/test_scanner_events.rb b/test/ripper/test_scanner_events.rb index 80ea96daaa..31792d36a7 100644 --- a/test/ripper/test_scanner_events.rb +++ b/test/ripper/test_scanner_events.rb @@ -53,6 +53,8 @@ class TestRipper::ScannerEvents < Test::Unit::TestCase Ripper.tokenize("1 .foo\n") assert_equal ["1", "\n", " ", ".", "foo", "\n"], Ripper.tokenize("1\n .foo\n") + assert_equal ["def", " ", "f", ";", " ", "(", "x", ")", "::", "A", " ", "="], + Ripper.tokenize("def f; (x)::A =") end def test_lex |
