diff options
Diffstat (limited to 'test/ruby/test_pattern_matching.rb')
-rw-r--r-- | test/ruby/test_pattern_matching.rb | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/test/ruby/test_pattern_matching.rb b/test/ruby/test_pattern_matching.rb index 0337e5d945..a5083ffabd 100644 --- a/test/ruby/test_pattern_matching.rb +++ b/test/ruby/test_pattern_matching.rb @@ -800,6 +800,10 @@ END true end end + + assert_syntax_error(%q{ + 0 => [a, *a] + }, /duplicated variable name/) end def test_find_pattern @@ -868,6 +872,10 @@ END false end end + + assert_syntax_error(%q{ + 0 => [*a, a, b, *b] + }, /duplicated variable name/) end def test_hash_pattern |