File tree Expand file tree Collapse file tree 5 files changed +7
-8
lines changed
ruby/ql/lib/codeql/ruby/frameworks Expand file tree Collapse file tree 5 files changed +7
-8
lines changed Original file line number Diff line number Diff line change @@ -40,7 +40,7 @@ private API::Node activeRecordClassApiNode() {
40
40
// In Rails applications `ApplicationRecord` typically extends `ActiveRecord::Base`, but we
41
41
// treat it separately in case the `ApplicationRecord` definition is not in the database.
42
42
API:: getTopLevelMember ( "ApplicationRecord" )
43
- ] . getASubclass ( )
43
+ ]
44
44
}
45
45
46
46
/**
@@ -58,7 +58,7 @@ private API::Node activeRecordClassApiNode() {
58
58
class ActiveRecordModelClass extends ClassDeclaration {
59
59
ActiveRecordModelClass ( ) {
60
60
this .getSuperclassExpr ( ) =
61
- activeRecordClassApiNode ( ) .getAValueReachableFromSource ( ) .asExpr ( ) .getExpr ( )
61
+ activeRecordClassApiNode ( ) .getASubclass ( ) . getAValueReachableFromSource ( ) .asExpr ( ) .getExpr ( )
62
62
}
63
63
64
64
// Gets the class declaration for this class and all of its super classes
Original file line number Diff line number Diff line change @@ -17,8 +17,9 @@ module ActiveResource {
17
17
/**
18
18
* An ActiveResource model class. This is any (transitive) subclass of ActiveResource.
19
19
*/
20
+ pragma [ nomagic]
20
21
private API:: Node modelApiNode ( ) {
21
- result = API:: getTopLevelMember ( "ActiveResource" ) .getMember ( "Base" ) .getASubclass + ( )
22
+ result = API:: getTopLevelMember ( "ActiveResource" ) .getMember ( "Base" ) .getASubclass ( )
22
23
}
23
24
24
25
/**
Original file line number Diff line number Diff line change @@ -85,7 +85,6 @@ module ActiveStorage {
85
85
// Class methods
86
86
API:: getTopLevelMember ( "ActiveStorage" )
87
87
.getMember ( "Blob" )
88
- .getASubclass ( )
89
88
.getAMethodCall ( [ "create_after_unfurling!" , "create_and_upload!" ] ) ,
90
89
// Instance methods
91
90
any ( BlobInstance i , DataFlow:: CallNode c |
Original file line number Diff line number Diff line change @@ -42,7 +42,7 @@ private class GraphqlRelayClassicMutationClass extends ClassDeclaration {
42
42
this .getSuperclassExpr ( ) =
43
43
graphQlSchema ( )
44
44
.getMember ( "RelayClassicMutation" )
45
- .getASubclass * ( )
45
+ .getASubclass ( )
46
46
.getAValueReachableFromSource ( )
47
47
.asExpr ( )
48
48
.getExpr ( )
Original file line number Diff line number Diff line change @@ -18,8 +18,7 @@ module Twirp {
18
18
*/
19
19
class ServiceInstantiation extends DataFlow:: CallNode {
20
20
ServiceInstantiation ( ) {
21
- this =
22
- API:: getTopLevelMember ( "Twirp" ) .getMember ( "Service" ) .getASubclass ( ) .getAnInstantiation ( )
21
+ this = API:: getTopLevelMember ( "Twirp" ) .getMember ( "Service" ) .getAnInstantiation ( )
23
22
}
24
23
25
24
/**
@@ -62,7 +61,7 @@ module Twirp {
62
61
*/
63
62
class ClientInstantiation extends DataFlow:: CallNode {
64
63
ClientInstantiation ( ) {
65
- this = API:: getTopLevelMember ( "Twirp" ) .getMember ( "Client" ) .getASubclass ( ) . getAnInstantiation ( )
64
+ this = API:: getTopLevelMember ( "Twirp" ) .getMember ( "Client" ) .getAnInstantiation ( )
66
65
}
67
66
}
68
67
You can’t perform that action at this time.
0 commit comments