From aa77bfd13ee183adde6bdc7812cfbb9580ea4b7a Mon Sep 17 00:00:00 2001 From: ydah Date: Wed, 27 Nov 2024 19:53:18 +0900 Subject: [ruby/prism] Reject extra comma in array after keyword argument Fixes: https://github.com/ruby/prism/issues/3109 https://github.com/ruby/prism/commit/9ed989c30d --- test/prism/errors/array_with_double_commas.txt | 3 +++ test/prism/errors/double_splat_with_double_commas.txt | 3 +++ 2 files changed, 6 insertions(+) create mode 100644 test/prism/errors/array_with_double_commas.txt create mode 100644 test/prism/errors/double_splat_with_double_commas.txt (limited to 'test') diff --git a/test/prism/errors/array_with_double_commas.txt b/test/prism/errors/array_with_double_commas.txt new file mode 100644 index 0000000000..7c971103f6 --- /dev/null +++ b/test/prism/errors/array_with_double_commas.txt @@ -0,0 +1,3 @@ +[a:1,,] + ^ unexpected ','; expected a `]` to close the array + diff --git a/test/prism/errors/double_splat_with_double_commas.txt b/test/prism/errors/double_splat_with_double_commas.txt new file mode 100644 index 0000000000..27873b7fac --- /dev/null +++ b/test/prism/errors/double_splat_with_double_commas.txt @@ -0,0 +1,3 @@ +[**a,,] + ^ unexpected ','; expected a `]` to close the array + -- cgit v1.2.3