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 {
861861 * Whether the text in the range start,end is an alternation
862862 */
863863 predicate alternation ( int start , int end ) {
864+ not this .inCharSet ( start ) and
864865 this .topLevel ( start , end ) and
865866 exists ( int less | this .subalternation ( start , less , _) and less < end )
866867 }
Original file line number Diff line number Diff line change @@ -181,11 +181,8 @@ regexp.rb:
181181# 26| [RegExpConstant, RegExpNormalChar] -
182182
183183# 27| [RegExpCharacterClass] [|]
184- #-----| 0 -> [RegExpAlt] |
185184#-----| 0 -> [RegExpConstant, RegExpNormalChar] |
186185
187- # 27| [RegExpAlt] |
188-
189186# 27| [RegExpConstant, RegExpNormalChar] |
190187
191188# 30| [RegExpCharacterClass] [[a-f]
You can’t perform that action at this time.
0 commit comments