Skip to content

Commit d977e8a

Browse files
committed
Ruby: remove unnecessary custom transitive version of getReceiver
1 parent 9821c4a commit d977e8a

File tree

1 file changed

+1
-13
lines changed

1 file changed

+1
-13
lines changed

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

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -125,23 +125,11 @@ private module Settings {
125125
loc.getFile().getStem() = "test"
126126
}
127127

128-
private DataFlow::Node getTransitiveReceiver(DataFlow::CallNode c) {
129-
exists(DataFlow::Node recv |
130-
recv = c.getReceiver() and
131-
(
132-
result = recv
133-
or
134-
recv instanceof DataFlow::CallNode and
135-
result = getTransitiveReceiver(recv)
136-
)
137-
)
138-
}
139-
140128
private class Setting extends DataFlow::CallNode {
141129
Setting() {
142130
// exclude some test configuration
143131
not isInTestConfiguration(this.getLocation()) and
144-
getTransitiveReceiver(this) instanceof Config::Node
132+
this.getReceiver+() instanceof Config::Node
145133
}
146134
}
147135

0 commit comments

Comments
 (0)