File tree Expand file tree Collapse file tree 1 file changed +2
-12
lines changed
ruby/ql/lib/codeql/ruby/frameworks Expand file tree Collapse file tree 1 file changed +2
-12
lines changed Original file line number Diff line number Diff line change @@ -32,19 +32,9 @@ private class RailtieClass extends ClassDeclaration {
3232 }
3333}
3434
35- // `Rails.application.config` calls
36- private API:: Node getConfigApiNode ( ) {
37- result = API:: getTopLevelMember ( "Rails" ) .getReturn ( "application" ) .getReturn ( "config" )
38- }
39-
40- // `Rails.application.configure`
41- private DataFlow:: CallNode getConfigureApiNode ( ) {
42- result = API:: getTopLevelMember ( "Rails" ) .getReturn ( "application" ) .getAMethodCall ( "configure" )
43- }
44-
4535private DataFlow:: CallNode getAConfigureCallNode ( ) {
4636 // `Rails.application.configure`
47- result = getConfigureApiNode ( )
37+ result = API :: getTopLevelMember ( "Rails" ) . getReturn ( "application" ) . getAMethodCall ( "configure" )
4838 or
4939 // `Rails::Application.configure`
5040 exists ( ConstantReadAccess read , RailtieClass cls |
@@ -66,7 +56,7 @@ private class ConfigSourceNode extends DataFlow::LocalSourceNode {
6656 )
6757 or
6858 // `Rails.application.config`
69- this = getConfigApiNode ( ) .getAnImmediateUse ( )
59+ this = API :: getTopLevelMember ( "Rails" ) . getReturn ( "application" ) . getReturn ( "config" ) .getAnImmediateUse ( )
7060 or
7161 // `Rails.application.configure { ... config ... }`
7262 // `Rails::Application.configure { ... config ... }`
You can’t perform that action at this time.
0 commit comments