Skip to content

Commit 3262a14

Browse files
committed
Ruby: use DataFlow::CallNode#getBlock to remove a cast
1 parent f3dcccb commit 3262a14

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ private class ConfigSourceNode extends DataFlow::LocalSourceNode {
6868
configCall = this.asExpr().getExpr()
6969
|
7070
configureCallNode = getAConfigureCallNode() and
71-
block = configureCallNode.asExpr().getExpr().(MethodCall).getBlock() and
71+
block = configureCallNode.getBlock().asExpr().getExpr() and
7272
configCall.getParent+() = block and
7373
configCall.getMethodName() = "config"
7474
)

0 commit comments

Comments
 (0)