Skip to content

Commit ec973ac

Browse files
Use not exists
1 parent 0a3d73d commit ec973ac

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

ruby/ql/lib/codeql/ruby/security/MassAssignmentCustomizations.qll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ module MassAssignment {
5757
/** Holds if `h` is an empty hash or contains an empty hash at one if its (possibly nested) values. */
5858
private predicate hasEmptyHash(Expr e) {
5959
e instanceof HashLiteral and
60-
count(e.(HashLiteral).getAKeyValuePair()) = 0
60+
not exists(e.(HashLiteral).getAKeyValuePair())
6161
or
6262
hasEmptyHash(e.(HashLiteral).getAKeyValuePair().getValue())
6363
or

0 commit comments

Comments
 (0)