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) {
37
37
guard .getAstNode ( ) = read .getVariable ( ) .getAnAccess ( ) and
38
38
branch = true
39
39
or
40
- // guard is `!var`
41
- guard .getAstNode ( ) .( NotExpr ) .getOperand ( ) = read .getVariable ( ) .getAnAccess ( ) and
42
- branch = false
43
- or
44
40
// guard is `var.nil?`
45
41
exists ( MethodCall c | guard .getAstNode ( ) = c |
46
42
c .getReceiver ( ) = read .getVariable ( ) .getAnAccess ( ) and
47
43
c .getMethodName ( ) = "nil?"
48
44
) and
49
45
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
4604
td>57
46
)
58
47
}
59
48
You can’t perform that action at this time.
0 commit comments