Lint/MixedCaseRange
raises an error for some non-literal ranges
#12259
Labels
Lint/MixedCaseRange
raises an error for some non-literal ranges
#12259
The begin or end of Regexp ranges can be non-literals (e.g. subsets, unicode properties, posix classes, codepoint lists).
It is better not to do that because it sometimes leads to weird Regexp behavior. There should perhaps be a cop against it. Either way,
MixedCaseRange
should not raise errors when encountering such constructs.It will probably suffice to change this comparison to
!= :literal
.Expected behavior
No error.
Actual behavior
Steps to reproduce the problem
RuboCop version
The text was updated successfully, but these errors were encountered: