diff options
| author | Takashi Kokubun <takashikkbn@gmail.com> | 2024-01-12 09:12:43 -0800 |
|---|---|---|
| committer | git <svn-admin@ruby-lang.org> | 2024-01-17 17:47:33 +0000 |
| commit | 603f2ca730cc62818a7a9852291f5877cbadd55d (patch) | |
| tree | 2892e2da616f40b51cb3e6fe97341562cfb45762 /test/prism/errors_test.rb | |
| parent | cd4290910c7f3f63118567101bf6cec4df90361a (diff) | |
[ruby/prism] Parse `it` default parameter
https://github.com/ruby/prism/commit/a0c5361b9f
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 d1af9a5dae..60322585f0 100644 --- a/test/prism/errors_test.rb +++ b/test/prism/errors_test.rb @@ -2069,6 +2069,13 @@ module Prism ], compare_ripper: false # Ripper does not check 'both block arg and actual block given'. end + def test_it_with_ordinary_parameter + source = "proc { || it }" + errors = [["`it` is not allowed when an ordinary parameter is defined", 10..12]] + + assert_errors expression(source), source, errors, compare_ripper: false + end + private def assert_errors(expected, source, errors, compare_ripper: RUBY_ENGINE == "ruby") |
