summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorNobuhiro IMAI <nov@yo.rim.or.jp>2021-01-09 12:18:14 +0900
committerNobuyoshi Nakada <nobu@ruby-lang.org>2021-01-09 13:33:33 +0900
commit7ff0e93f96cc55467d791ebc841f12f9130bf181 (patch)
tree652c6f7f4c7e0439ede65ce17ac8b5c7c8bcfc6c /test
parent1a3343cfdcb765b94bf63375d45618130d6b92c9 (diff)
parse.y: handle "duplicated argument name" appropriately on ripper.y
refs: 733ed1e184
Diffstat (limited to 'test')
-rw-r--r--test/ripper/test_lexer.rb1
1 files changed, 1 insertions, 0 deletions
diff --git a/test/ripper/test_lexer.rb b/test/ripper/test_lexer.rb
index f8e751da53..9762478c62 100644
--- a/test/ripper/test_lexer.rb
+++ b/test/ripper/test_lexer.rb
@@ -148,6 +148,7 @@ class TestRipper::Lexer < Test::Unit::TestCase
BAD_CODE = [
[:parse_error, 'def req(true) end', %r[unexpected `true'], 'true'],
+ [:parse_error, 'def req(a, a) end', %r[duplicated argument name], 'a'],
[:assign_error, 'begin; nil = 1; end', %r[assign to nil], 'nil'],
[:alias_error, 'begin; alias $x $1; end', %r[number variables], '$1'],
[:class_name_error, 'class bad; end', %r[class/module name], 'bad'],