mirror of
https://github.com/ruby/ruby.git
synced 2025-08-28 15:36:16 +02:00
parse.y: no named capture conflict warnings
* parse.y (reg_named_capture_assign_iter): remove named capture conflict warnings. it is just annoying rather than useful. [ruby-core:75416] [Bug #12359] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55396 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
9042cf217e
commit
75a68057c7
3 changed files with 8 additions and 6 deletions
|
@ -869,9 +869,9 @@ x = __ENCODING__
|
|||
|
||||
def test_named_capture_conflict
|
||||
a = 1
|
||||
assert_warning(/named capture conflict/) {eval("a = 1; /(?<a>)/ =~ ''")}
|
||||
assert_warning('') {eval("a = 1; /(?<a>)/ =~ ''")}
|
||||
a = "\u{3042}"
|
||||
assert_warning(/#{a}/) {eval("#{a} = 1; /(?<#{a}>)/ =~ ''")}
|
||||
assert_warning('') {eval("#{a} = 1; /(?<#{a}>)/ =~ ''")}
|
||||
end
|
||||
|
||||
=begin
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue