diff --git a/core/builtin.rbs b/core/builtin.rbs index cac44450b..8bee589d8 100644 --- a/core/builtin.rbs +++ b/core/builtin.rbs @@ -179,11 +179,11 @@ interface _EachEntry[out T] end interface _Reader - def read: (?int? length, ?string outbuf) -> String? + def read: (?int? length, ?string? outbuf) -> String? end interface _ReaderPartial - def readpartial: (int maxlen, ?string outbuf) -> String + def readpartial: (int maxlen, ?string? outbuf) -> String end interface _Writer diff --git a/core/io.rbs b/core/io.rbs index 1b6f79bb9..d31a5b1d8 100644 --- a/core/io.rbs +++ b/core/io.rbs @@ -1492,7 +1492,7 @@ class IO < Object # # Not available on some platforms. # - def pread: (int maxlen, int offset, ?string out_string) -> String + def pread: (int maxlen, int offset, ?string? out_string) -> String # # The "sync mode" of the SSLSocket. @@ -9235,7 +9235,7 @@ module OpenSSL # Reads *length* bytes from the SSL connection. If a pre-allocated *buffer* is # provided the data will be written into it. # - def sysread: (Integer length, ?String buffer) -> String + def sysread: (Integer length, ?String? buffer) -> String # # See IO#read. # - def read: (?int? length, ?string outbuf) -> String? + def read: (?int? length, ?string? outbuf) -> String? # # See IO#pread. # - def pread: (Integer maxlen, Integer offset, ?String outbuf) -> String + def pread: (Integer maxlen, Integer offset, ?String? outbuf) -> String - def read_nonblock: (int len, ?string buf, ?exception: bool) -> String? + def read_nonblock: (int len, ?string? buf, ?exception: bool) -> String? def readbyte: () -> Integer @@ -1311,7 +1311,7 @@ class StringIO # def readlines: (?String sep, ?Integer limit, ?chomp: boolish) -> ::Array[String] - def readpartial: (int maxlen, ?string outbuf) -> String + def readpartial: (int maxlen, ?string? outbuf) -> String # # See Zlib::GzipReader documentation for a description. # - def read: (?int? length, ?string outbuf) -> String? + def read: (?int? length, ?string? outbuf) -> String? #