File tree Expand file tree Collapse file tree 3 files changed +9
-1
lines changed
lib/codeql/ruby/frameworks/core/internal
test/library-tests/frameworks/files Expand file tree Collapse file tree 3 files changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -137,7 +137,7 @@ class IOOrFileWriteMethodCall extends IOOrFileMethodCall {
137
137
receiverKind = "class" and
138
138
api = [ "IO" , "File" ] and
139
139
this = API:: getTopLevelMember ( api ) .getAMethodCall ( methodName ) and
140
- methodName = [ "binwrite" , "write" ] and
140
+ methodName = [ "binwrite" , "write" , "atomic_write" ] and
141
141
dataNode = this .getArgument ( 1 )
142
142
or
143
143
// e.g. `{IO,File}.new("foo.txt", "a+).puts("hello")`
Original file line number Diff line number Diff line change @@ -76,6 +76,8 @@ fileSystemAccesses
76
76
| Files.rb:41:1:41:26 | call to open |
77
77
| Files.rb:41:1:41:43 | call to write |
78
78
| Files.rb:48:1:48:40 | call to printf |
79
+ | Files.rb:49:1:49:30 | call to write |
80
+ | Files.rb:50:1:50:37 | call to atomic_write |
79
81
fileNameSources
80
82
| Files.rb:10:6:10:18 | call to path |
81
83
| Files.rb:11:6:11:21 | call to to_path |
@@ -86,7 +88,11 @@ fileWriters
86
88
| Files.rb:40:1:40:22 | call to puts |
87
89
| Files.rb:41:1:41:43 | call to write |
88
90
| Files.rb:48:1:48:40 | call to printf |
91
+ | Files.rb:49:1:49:30 | call to write |
92
+ | Files.rb:50:1:50:37 | call to atomic_write |
89
93
fileSystemWriteAccesses
90
94
| Files.rb:40:1:40:22 | call to puts |
91
95
| Files.rb:41:1:41:43 | call to write |
92
96
| Files.rb:48:1:48:40 | call to printf |
97
+ | Files.rb:49:1:49:30 | call to write |
98
+ | Files.rb:50:1:50:37 | call to atomic_write |
Original file line number Diff line number Diff line change 46
46
int_1 = 123
47
47
# File/IO write
48
48
io_file . printf ( "%s: %d\n " , str_1 , int_1 )
49
+ File . write ( "foo.txt" , "hello" )
50
+ File . atomic_write ( "foo.txt" , "hello" )
You can’t perform that action at this time.
0 commit comments