summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKevin Newton <kddnewton@gmail.com>2024-04-04 13:54:09 -0400
committerKevin Newton <kddnewton@gmail.com>2024-04-04 15:29:14 -0400
commit2ecf269e6877d8cdf794ef6ff2c1438d1d4432a8 (patch)
tree5f46f53e762544d9f0eedb999e58295df6017cc4
parentf45c9dbe87d6f70042c18b03ee178099ef48eb4c (diff)
[ruby/prism] Eliminate character class duplicated range warning
https://github.com/ruby/prism/commit/da939bbd4e
-rw-r--r--test/prism/fixtures/regex.txt4
-rw-r--r--test/prism/snapshots/regex.txt4
2 files changed, 4 insertions, 4 deletions
diff --git a/test/prism/fixtures/regex.txt b/test/prism/fixtures/regex.txt
index 18200e5cbd..84b5ca0600 100644
--- a/test/prism/fixtures/regex.txt
+++ b/test/prism/fixtures/regex.txt
@@ -19,8 +19,8 @@ foo /bar/
%r/[a-z$._?][\w$.?#@~]*/i
%r(
-(?:[\w#$%_']|\(\)|\(,\)|\[\]|[0-9])*
- (?:[\w#$%_']+)
+(?:[#$%_']|\(\)|\(,\)|\[\]|[0-9])*
+ (?:[#$%_']+)
)
/(?#\))/ =~ "hi"
diff --git a/test/prism/snapshots/regex.txt b/test/prism/snapshots/regex.txt
index ef576b8bc0..d4d153e8d5 100644
--- a/test/prism/snapshots/regex.txt
+++ b/test/prism/snapshots/regex.txt
@@ -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: