[ruby/prism] Eliminate character class duplicated range warning

https://github.com/ruby/prism/commit/da939bbd4e
This commit is contained in:
Kevin Newton 2024-04-04 13:54:09 -04:00
parent f45c9dbe87
commit 2ecf269e68
2 changed files with 4 additions and 4 deletions

View File

@ -19,8 +19,8 @@ foo /bar/
%r/[a-z$._?][\w$.?#@~]*/i %r/[a-z$._?][\w$.?#@~]*/i
%r( %r(
(?:[\w#$%_']|\(\)|\(,\)|\[\]|[0-9])* (?:[#$%_']|\(\)|\(,\)|\[\]|[0-9])*
(?:[\w#$%_']+) (?:[#$%_']+)
) )
/(?#\))/ =~ "hi" /(?#\))/ =~ "hi"

View File

@ -153,9 +153,9 @@
├── @ RegularExpressionNode (location: (21,0)-(24,1)) ├── @ RegularExpressionNode (location: (21,0)-(24,1))
│ ├── flags: forced_us_ascii_encoding │ ├── flags: forced_us_ascii_encoding
│ ├── opening_loc: (21,0)-(21,3) = "%r(" │ ├── opening_loc: (21,0)-(21,3) = "%r("
│ ├── content_loc: (21,3)-(24,0) = "\n(?:[\\w\#$%_']|\\(\\)|\\(,\\)|\\[\\]|[0-9])*\n (?:[\\w\#$%_']+)\n" │ ├── content_loc: (21,3)-(24,0) = "\n(?:[\#$%_']|\\(\\)|\\(,\\)|\\[\\]|[0-9])*\n (?:[\#$%_']+)\n"
│ ├── closing_loc: (24,0)-(24,1) = ")" │ ├── closing_loc: (24,0)-(24,1) = ")"
│ └── unescaped: "\n(?:[\\w\#$%_']|\\(\\)|\\(,\\)|\\[\\]|[0-9])*\n (?:[\\w\#$%_']+)\n" │ └── unescaped: "\n(?:[\#$%_']|\\(\\)|\\(,\\)|\\[\\]|[0-9])*\n (?:[\#$%_']+)\n"
├── @ CallNode (location: (26,0)-(26,16)) ├── @ CallNode (location: (26,0)-(26,16))
│ ├── flags: ∅ │ ├── flags: ∅
│ ├── receiver: │ ├── receiver: