File tree Expand file tree Collapse file tree 2 files changed +1
-3
lines changed
lib/codeql/ruby/security/performance
test/library-tests/regexp Expand file tree Collapse file tree 2 files changed +1
-3
lines changed Original file line number Diff line number Diff line change @@ -861,6 +861,7 @@ abstract class RegExp extends AST::StringlikeLiteral {
861
861
* Whether the text in the range start,end is an alternation
862
862
*/
863
863
predicate alternation ( int start , int end ) {
864
+ not this .inCharSet ( start ) and
864
865
this .topLevel ( start , end ) and
865
866
exists ( int less | this .subalternation ( start , less , _) and less < end )
866
867
}
Original file line number Diff line number Diff line change @@ -181,11 +181,8 @@ regexp.rb:
181
181
# 26| [RegExpConstant, RegExpNormalChar] -
182
182
183
183
# 27| [RegExpCharacterClass] [|]
184
- #-----| 0 -> [RegExpAlt] |
185
184
#-----| 0 -> [RegExpConstant, RegExpNormalChar] |
186
185
187
- # 27| [RegExpAlt] |
188
-
189
186
# 27| [RegExpConstant, RegExpNormalChar] |
190
187
191
188
# 30| [RegExpCharacterClass] [[a-f]
You can’t perform that action at this time.
0 commit comments