@@ -99,7 +99,7 @@ module IO {
99
99
}
100
100
101
101
/**
102
- * A `DataFlow::CallNode ` that reads data using the `IO` class. For example,
102
+ * A `DataFlow::MethodCallNode ` that reads data using the `IO` class. For example,
103
103
* the `IO.read call in:
104
104
*
105
105
* ```rb
@@ -112,7 +112,7 @@ module IO {
112
112
* filesystem. For working with filesystem accesses specifically, see
113
113
* `IOFileReader` or the `FileSystemReadAccess` concept.
114
114
*/
115
- class IOReader extends DataFlow:: CallNode {
115
+ class IOReader extends DataFlow:: MethodCallNode {
116
116
private boolean classMethodCall ;
117
117
private string api ;
118
118
@@ -127,17 +127,15 @@ module IO {
127
127
api = "IO" and
128
128
exists ( IOInstanceStrict ii |
129
129
this .getReceiver ( ) = ii and
130
- this .asExpr ( ) .getExpr ( ) .( MethodCall ) .getMethodName ( ) =
131
- ioFileReaderMethodName ( classMethodCall )
130
+ this .getMethodName ( ) = ioFileReaderMethodName ( classMethodCall )
132
131
)
133
132
or
134
133
// File instance methods
135
134
classMethodCall = false and
136
135
api = "File" and
137
136
exists ( File:: FileInstance fi |
138
137
this .getReceiver ( ) = fi and
139
- this .asExpr ( ) .getExpr ( ) .( MethodCall ) .getMethodName ( ) =
140
- ioFileReaderMethodName ( classMethodCall )
138
+ this .getMethodName ( ) = ioFileReaderMethodName ( classMethodCall )
141
139
)
142
140
// TODO: enumeration style methods such as `each`, `foreach`, etc.
143
141
}
@@ -151,7 +149,7 @@ module IO {
151
149
}
152
150
153
151
/**
154
- * A `DataFlow::CallNode ` that reads data from the filesystem using the `IO`
152
+ * A `DataFlow::MethodCallNode ` that reads data from the filesystem using the `IO`
155
153
* class. For example, the `IO.read call in:
156
154
*
157
155
* ```rb
@@ -219,7 +217,7 @@ module File {
219
217
/**
220
218
* A call to a `File` method that may return one or more filenames.
221
219
*/
222
- class FileModuleFilenameSource extends FileNameSource , DataFlow:: CallNode {
220
+ class FileModuleFilenameSource extends FileNameSource , DataFlow:: MethodCallNode {
223
221
FileModuleFilenameSource ( ) {
224
222
// Class methods
225
223
this =
@@ -232,13 +230,13 @@ module File {
232
230
// Instance methods
233
231
exists ( FileInstance fi |
234
232
this .getReceiver ( ) = fi and
235
- this .asExpr ( ) . getExpr ( ) . ( MethodCall ) . getMethodName ( ) = [ "path" , "to_path" ]
233
+ this .getMethodName ( ) = [ "path" , "to_path" ]
236
234
)
237
235
}
238
236
}
239
237
240
238
private class FileModulePermissionModification extends FileSystemPermissionModification:: Range ,
241
- DataFlow:: CallNode {
239
+ DataFlow:: MethodCallNode {
242
240
private DataFlow:: Node permissionArg ;
243
241
244
242
FileModulePermissionModification ( ) {
@@ -321,7 +319,7 @@ module FileUtils {
321
319
}
322
320
323
321
private class FileUtilsPermissionModification extends FileSystemPermissionModification:: Range ,
324
- DataFlow:: CallNode {
322
+ DataFlow:: MethodCallNode {
325
323
private DataFlow:: Node permissionArg ;
326
324
327
325
FileUtilsPermissionModification ( ) {
0 commit comments