Skip to content

Commit 07956c9

Browse files
committed
Ruby: Avoid a forced CP that confused the join orderer.
1 parent c22b05a commit 07956c9

File tree

1 file changed

+9
-1
lines changed
  • ruby/ql/lib/codeql/ruby/frameworks/http_clients

1 file changed

+9
-1
lines changed

ruby/ql/lib/codeql/ruby/frameworks/http_clients/NetHttp.qll

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,15 @@ class NetHttpRequest extends Http::Client::Request::Range, DataFlow::CallNode {
5454
override DataFlow::Node getAUrlPart() {
5555
result = request.getArgument(0)
5656
or
57-
// Net::HTTP.new(...).get(...)
57+
result = this.getAUrlPartHelper()
58+
}
59+
60+
/**
61+
* Helper predicate for `getAUrlPart`.
62+
*
63+
* This handles `Net::HTTP.new(...).get(...)` etc.
64+
*/
65+
private DataFlow::Node getAUrlPartHelper() {
5866
exists(API::Node new |
5967
new = API::getTopLevelMember("Net").getMember("HTTP").getInstance() and
6068
requestNode = new.getReturn(_)

0 commit comments

Comments
 (0)