diff options
author | Haldun Bayhantopcu <haldun@github.com> | 2023-10-05 16:48:14 +0200 |
---|---|---|
committer | git <svn-admin@ruby-lang.org> | 2023-10-05 15:12:05 +0000 |
commit | 38cb92a00c65526898ec4d7949e7d0f9b75666a5 (patch) | |
tree | 7a4026a8b23c76a6a6d2c0418e9175963ecae084 /test/prism/errors_test.rb | |
parent | fb9795cf7a25d675d1fd525997fd002a16f46aec (diff) | |
download | ruby-38cb92a00c65526898ec4d7949e7d0f9b75666a5.tar.gz |
[ruby/prism] Check for duplicate names in shadow args
https://github.com/ruby/prism/commit/e100c6b8ae
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 cb58b3cd21..b2a6bc8d13 100644 --- a/test/prism/errors_test.rb +++ b/test/prism/errors_test.rb @@ -1373,6 +1373,13 @@ module Prism ] end + def test_shadow_args_in_block + source = "tap{|a;a|}" + assert_errors expression(source), source, [ + ["Repeated parameter name", 7..8], + ] + end + private def assert_errors(expected, source, errors, compare_ripper: RUBY_ENGINE == "ruby") |