Commit eddd10c
authored
Fix Ruby 3.4 regex warning: remove duplicated range in character class (#1640)
# Description
Replace `[\W<]` with `\W` in regex lookahead since `<` is already
[included](https://ruby-doc.org/3.4.1/Regexp.html#class-Regexp-label-Shorthand+Character+Classes)
in `\W`. This resolves the 'character class has duplicated range'
warning in Ruby 3.4.
Fixes #1609
Warnings are
[disabled](https://github.com/lsegal/yard/blob/34796c5bfc0ce69a5fea1b38d96435fc4f5b7a75/spec/spec_helper.rb#L188)
in specs, so I am unable to easily write an effective test.
# Completed Tasks
- [x] I have read the [Contributing Guide][contrib].
- [x] The pull request is complete (implemented / written).
- [x] Git commits have been cleaned up (squash WIP / revert commits).
- [ ] I wrote tests and ran `bundle exec rake` locally (if code is
attached to PR).
[contrib]: https://github.com/lsegal/yard/blob/main/CONTRIBUTING.md1 file changed
+1
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
228 | 228 | | |
229 | 229 | | |
230 | 230 | | |
231 | | - | |
| 231 | + | |
232 | 232 | | |
233 | 233 | | |
234 | 234 | | |
| |||
0 commit comments