diff options
author | Haldun Bayhantopcu <haldun@github.com> | 2023-09-27 20:24:19 +0200 |
---|---|---|
committer | git <svn-admin@ruby-lang.org> | 2023-09-28 13:31:22 +0000 |
commit | 7799fe90da49958af0d33d18c82f12012610f32a (patch) | |
tree | 8c98f0749b042432eadbfa62275444cfc80e673a /test/prism/errors_test.rb | |
parent | 0084bac47a49d787a86c4cfd4d238c24736eb659 (diff) | |
download | ruby-7799fe90da49958af0d33d18c82f12012610f32a.tar.gz |
[ruby/prism] Check for a semicolon or a newline after the inheritance operator
https://github.com/ruby/prism/commit/0326ba6775
Diffstat (limited to 'test/prism/errors_test.rb')
-rw-r--r-- | test/prism/errors_test.rb | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/test/prism/errors_test.rb b/test/prism/errors_test.rb index 1975a17102..372e7791db 100644 --- a/test/prism/errors_test.rb +++ b/test/prism/errors_test.rb @@ -1355,6 +1355,13 @@ module Prism ] end + def test_semicolon_after_inheritance_operator + source = "class Foo < Bar end" + assert_errors expression(source), source, [ + ["Unexpected `end`, expecting ';' or '\n'", 15..15], + ] + end + private def assert_errors(expected, source, errors, compare_ripper: RUBY_ENGINE == "ruby") |