File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed
ruby/ql/lib/codeql/ruby/frameworks/core Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -1142,7 +1142,12 @@ module Array {
1142
1142
this = mc .getMethodName ( ) + "(" + mc .getNumberOfArguments ( ) + ")"
1143
1143
}
1144
1144
1145
- override MethodCall getACallSimple ( ) { result = mc }
1145
+ 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
+ }
1146
1151
1147
1152
override predicate propagatesFlowExt ( string input , string output , boolean preservesValue ) {
1148
1153
exists ( int num | num = mc .getNumberOfArguments ( ) and preservesValue = true |
You can’t perform that action at this time.
0 commit comments