File tree Expand file tree Collapse file tree 1 file changed +0
-11
lines changed
ruby/ql/src/queries/variables Expand file tree Collapse file tree 1 file changed +0
-11
lines changed Original file line number Diff line number Diff line change @@ -37,23 +37,12 @@ predicate isGuarded(LocalVariableReadAccess read) {
3737 guard .getAstNode ( ) = read .getVariable ( ) .getAnAccess ( ) and
3838 branch = true
3939 or
40- // guard is `!var`
41- guard .getAstNode ( ) .( NotExpr ) .getOperand ( ) = read .getVariable ( ) .getAnAccess ( ) and
42- branch = false
43- or
4440 // guard is `var.nil?`
4541 exists ( MethodCall c | guard .getAstNode ( ) = c |
4642 c .getReceiver ( ) = read .getVariable ( ) .getAnAccess ( ) and
4743 c .getMethodName ( ) = "nil?"
4844 ) and
4945 branch = false
50- or
51- // guard is `!var.nil?`
52- exists ( MethodCall c | guard .getAstNode ( ) .( NotExpr ) .getOperand ( ) = c |
53- c .getReceiver ( ) = read .getVariable ( ) .getAnAccess ( ) and
54- c .getMethodName ( ) = "nil?"
55- ) and
56- branch = true
5746 )
5847}
5948
You can’t perform that action at this time.
0 commit comments