diff options
| author | Kevin Newton <kddnewton@gmail.com> | 2024-04-12 13:18:47 -0400 |
|---|---|---|
| committer | git <svn-admin@ruby-lang.org> | 2024-04-12 17:30:37 +0000 |
| commit | 52b862398d264e46ad2c04286ef464cc513322ab (patch) | |
| tree | 4c6031d678cf86a2412022658b5c34c1dc1a2e94 /test | |
| parent | 0424c1fa7b2554f4f7768635f6414281f895d3df (diff) | |
[ruby/prism] Syntax error for block argument on yield
https://github.com/ruby/prism/commit/9feeafbc67
Diffstat (limited to 'test')
| -rw-r--r-- | test/prism/errors_test.rb | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/test/prism/errors_test.rb b/test/prism/errors_test.rb index 0a06e4bd38..09f37eb5b3 100644 --- a/test/prism/errors_test.rb +++ b/test/prism/errors_test.rb @@ -2202,6 +2202,10 @@ module Prism refute_error_messages "case (); in [{a:1}, {a:2}]; end" end + def test_unexpected_block + assert_error_messages "def foo = yield(&:+)", ["block argument should not be given"] + end + private def assert_errors(expected, source, errors, check_valid_syntax: true) |
