Ruby: make getAStaticHashCall private again

This commit is contained in:
Asger F
2022-10-05 09:32:56 +02:00
parent 948594043d
commit 4c19d2d71e

View File

@@ -42,7 +42,7 @@ module Hash {
* Gets a call to the method `name` invoked on the `Hash` object
* (not on a hash instance).
*/
MethodCall getAStaticHashCall(string name) {
private MethodCall getAStaticHashCall(string name) {
result.getMethodName() = name and
resolveConstantReadAccess(result.getReceiver()) = TResolved("Hash")
}
@@ -72,7 +72,7 @@ module Hash {
/** Holds if `literal` is a call to `Hash.[]` and `argument` is one of its arguments. */
private predicate hashLiteralStore(DataFlow::CallNode literal, DataFlow::Node argument) {
literal.getExprNode().getExpr() = Hash::getAStaticHashCall("[]") and
literal.getExprNode().getExpr() = getAStaticHashCall("[]") and
argument = literal.getArgument(_)
}