diff options
| author | Hiroya Fujinami <make.just.on@gmail.com> | 2023-11-22 02:03:29 +0900 |
|---|---|---|
| committer | git <svn-admin@ruby-lang.org> | 2023-11-21 17:03:33 +0000 |
| commit | ad25313ca813eda99ac5ae56544a3ec9411f342e (patch) | |
| tree | c47a8022a6335f0f5a2317b88a76295b5fcc4875 /test | |
| parent | 0aafd040c3fee4ad2b5dde4b58c1a4f1ee7ace18 (diff) | |
[ruby/prism] Fix `..` and `...` to be non-associative
(https://github.com/ruby/prism/pull/1837)
Fix https://github.com/ruby/prism/pull/1829
https://github.com/ruby/prism/commit/90b0b1974c
Co-authored-by: Kevin Newton <kddnewton@gmail.com>
Diffstat (limited to 'test')
| -rw-r--r-- | test/prism/errors_test.rb | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/test/prism/errors_test.rb b/test/prism/errors_test.rb index 9362032fe3..99b799d9c5 100644 --- a/test/prism/errors_test.rb +++ b/test/prism/errors_test.rb @@ -1708,6 +1708,14 @@ module Prism ] end + def test_non_assoc_range + source = '1....2' + assert_errors expression(source), source, [ + ['Expected a newline or semicolon after the statement', 4..4], + ['Cannot parse the expression', 4..4], + ] + end + def test_upcase_end_in_def assert_warning_messages "def foo; END { }; end", [ "END in method; use at_exit" |
