Skip to content

Commit

Permalink
[ruby/prism] Eliminate character class duplicated range warning
Browse files Browse the repository at this point in the history
  • Loading branch information
kddnewton committed Apr 4, 2024
1 parent f45c9db commit 2ecf269
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions test/prism/fixtures/regex.txt
Expand Up @@ -19,8 +19,8 @@ foo /bar/
%r/[a-z$._?][\w$.?#@~]*/i

%r(
(?:[\w#$%_']|\(\)|\(,\)|\[\]|[0-9])*
(?:[\w#$%_']+)
(?:[#$%_']|\(\)|\(,\)|\[\]|[0-9])*
(?:[#$%_']+)
)

/(?#\))/ =~ "hi"
Expand Down
4 changes: 2 additions & 2 deletions test/prism/snapshots/regex.txt
Expand Up @@ -153,9 +153,9 @@
├── @ RegularExpressionNode (location: (21,0)-(24,1))
│ ├── flags: forced_us_ascii_encoding
│ ├── 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) = ")"
│ └── unescaped: "\n(?:[\\w\#$%_']|\\(\\)|\\(,\\)|\\[\\]|[0-9])*\n (?:[\\w\#$%_']+)\n"
│ └── unescaped: "\n(?:[\#$%_']|\\(\\)|\\(,\\)|\\[\\]|[0-9])*\n (?:[\#$%_']+)\n"
├── @ CallNode (location: (26,0)-(26,16))
│ ├── flags: ∅
│ ├── receiver:
Expand Down

0 comments on commit 2ecf269

Please sign in to comment.