Skip to content

Commit eb4f333

Browse files
committed
Ruby: Move UnknownMethodCall to ast/Call.qll
1 parent a397c65 commit eb4f333

File tree

6 files changed

+11
-12
lines changed

6 files changed

+11
-12
lines changed

ruby/ql/lib/codeql/ruby/ast/Call.qll

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,16 @@ class MethodCall extends Call instanceof MethodCallImpl {
116116
}
117117
}
118118

119+
/**
120+
* A `Method` call that has no known target.
121+
* These will typically be calls to methods inherited from a superclass.
122+
* TODO: When API Graphs is able to resolve calls to methods like `Kernel.send`
123+
* this class is no longer necessary and should be removed.
124+
*/
125+
class UnknownMethodCall extends MethodCall {
126+
UnknownMethodCall() { not exists(this.(Call).getATarget()) }
127+
}
128+
119129
/**
120130
* A call to a setter method.
121131
* ```rb

ruby/ql/lib/codeql/ruby/frameworks/Core.qll

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,6 @@ import core.Module
88
import core.Array
99
import core.Regexp
1010

11-
/**
12-
* A `Method` call that has no known target.
13-
* These will typically be calls to methods inherited from a superclass.
14-
*/
15-
class UnknownMethodCall extends MethodCall {
16-
UnknownMethodCall() { not exists(this.(Call).getATarget()) }
17-
}
18-
1911
/**
2012
* A system command executed via subshell literal syntax.
2113
* E.g.

ruby/ql/lib/codeql/ruby/frameworks/core/BasicObject.qll

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
private import codeql.ruby.AST
22
private import codeql.ruby.Concepts
33
private import codeql.ruby.DataFlow
4-
private import codeql.ruby.frameworks.Core
54

65
module BasicObject {
76
/**

ruby/ql/lib/codeql/ruby/frameworks/core/Kernel.qll

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ private import codeql.ruby.Concepts
55
private import codeql.ruby.DataFlow
66
private import codeql.ruby.dataflow.FlowSummary
77
private import codeql.ruby.dataflow.internal.DataFlowDispatch
8-
private import codeql.ruby.frameworks.Core
98

109
/** Modeling for the `Kernel` class. */
1110
module Kernel {

ruby/ql/lib/codeql/ruby/frameworks/core/Module.qll

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
private import codeql.ruby.AST
22
private import codeql.ruby.Concepts
33
private import codeql.ruby.DataFlow
4-
private import codeql.ruby.frameworks.Core
54

65
module Module {
76
/**

ruby/ql/lib/codeql/ruby/frameworks/core/Object.qll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
private import codeql.ruby.frameworks.Core
1+
private import codeql.ruby.AST
22

33
module Object {
44
/**

0 commit comments

Comments
 (0)