We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 00e52ad commit fd9c1e4Copy full SHA for fd9c1e4
1 file changed
ruby/ql/lib/codeql/ruby/frameworks/core/Array.qll
@@ -1142,7 +1142,12 @@ module Array {
1142
this = mc.getMethodName() + "(" + mc.getNumberOfArguments() + ")"
1143
}
1144
1145
- override MethodCall getACallSimple() { result = mc }
+ override MethodCall getACallSimple() {
1146
+ result = mc and
1147
+ // Filter out obvious 'prepend' calls in a module scope
1148
+ // Including such calls is mostly harmless but also easy to filter out
1149
+ not result.getReceiver().(SelfVariableAccess).getCfgScope() instanceof ModuleBase
1150
+ }
1151
1152
override predicate propagatesFlowExt(string input, string output, boolean preservesValue) {
1153
exists(int num | num = mc.getNumberOfArguments() and preservesValue = true |
0 commit comments