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 {
32
32
}
33
33
}
34
34
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
-
45
35
private DataFlow:: CallNode getAConfigureCallNode ( ) {
46
36
// `Rails.application.configure`
47
- result = getConfigureApiNode ( )
37
+ result = API :: getTopLevelMember ( "Rails" ) . getReturn ( "application" ) . getAMethodCall ( "configure" )
48
38
or
49
39
// `Rails::Application.configure`
50
40
exists ( ConstantReadAccess read , RailtieClass cls |
@@ -66,7 +56,7 @@ private class ConfigSourceNode extends DataFlow::LocalSourceNode {
66
56
)
67
57
or
68
58
// `Rails.application.config`
69
- this = getConfigApiNode ( ) .getAnImmediateUse ( )
59
+ this = API :: getTopLevelMember ( "Rails" ) . getReturn ( "application" ) . getReturn ( "config" ) .getAnImmediateUse ( )
70
60
or
71
61
// `Rails.application.configure { ... config ... }`
72
62
// `Rails::Application.configure { ... config ... }`
You can’t perform that action at this time.
0 commit comments