mirror of
https://github.com/github/codeql.git
synced 2026-04-30 03:05:15 +02:00
test for IO.open as a way of creating an IO instance
This commit is contained in:
@@ -34,6 +34,8 @@ ioInstances
|
||||
| Files.rb:23:19:23:33 | call to open |
|
||||
| Files.rb:24:1:24:40 | ... = ... |
|
||||
| Files.rb:24:19:24:40 | call to open |
|
||||
| Files.rb:35:1:35:56 | ... = ... |
|
||||
| Files.rb:35:13:35:56 | call to open |
|
||||
fileReaders
|
||||
| Files.rb:7:13:7:32 | call to readlines |
|
||||
ioReaders
|
||||
|
||||
@@ -30,3 +30,6 @@ foo_text = IO.read("foo.txt")
|
||||
|
||||
# `IO.read("|date")` does not read from a file
|
||||
date = IO.read("|date")
|
||||
|
||||
# `rand_open` is an `IO` instance
|
||||
rand_open = IO.open(IO.sysopen("/dev/random", "r"), "r")
|
||||
|
||||
Reference in New Issue
Block a user