Skip to content

Commit 1eba827

Browse files
authored
Merge pull request github#7614 from github/nickrolfe/array_flow_summaries
Ruby: add more Array/Enumerable flow summaries
2 parents ff369f2 + dc09e87 commit 1eba827

File tree

6 files changed

+11353
-2174
lines changed

6 files changed

+11353
-2174
lines changed

ruby/ql/lib/codeql/ruby/dataflow/FlowSummary.qll

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -134,10 +134,12 @@ abstract class SummarizedCallable extends LibraryCallable {
134134
* calls to a method with the same name are considered relevant.
135135
*/
136136
abstract class SimpleSummarizedCallable extends SummarizedCallable {
137+
MethodCall mc;
138+
137139
bindingset[this]
138-
SimpleSummarizedCallable() { any() }
140+
SimpleSummarizedCallable() { mc.getMethodName() = this }
139141

140-
final override MethodCall getACall() { result.getMethodName() = this }
142+
final override MethodCall getACall() { result = mc }
141143
}
142144

143145
private class SummarizedCallableAdapter extends Impl::Public::SummarizedCallable {

0 commit comments

Comments
 (0)