Skip to content

Commit 7808e64

Browse files
committed
Fix signature for IO.binread, .copy_stream and .read
1 parent 01ae992 commit 7808e64

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

core/io.rbs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2278,7 +2278,7 @@ class IO < Object
22782278
# potential security vulnerabilities if called with untrusted input; see
22792279
# [Command Injection](rdoc-ref:command_injection.rdoc).
22802280
#
2281-
def self.binread: (String name, ?Integer length, ?Integer offset) -> String
2281+
def self.binread: (String name, ?Integer? length, ?Integer offset) -> String
22822282

22832283
# <!--
22842284
# rdoc-file=io.c
@@ -2343,7 +2343,7 @@ class IO < Object
23432343
# IO.copy_stream('t.txt', 't.tmp', 11, 11) # => 11
23442344
# IO.read('t.tmp') # => "Second line"
23452345
#
2346-
def self.copy_stream: (String | _Reader | _ReaderPartial src, String | _Writer dst, ?Integer copy_length, ?Integer src_offset) -> Integer
2346+
def self.copy_stream: (String | _Reader | _ReaderPartial src, String | _Writer dst, ?Integer? copy_length, ?Integer src_offset) -> Integer
23472347

23482348
# <!--
23492349
# rdoc-file=io.c
@@ -2716,7 +2716,7 @@ class IO < Object
27162716
# * [Open Options](rdoc-ref:IO@Open+Options).
27172717
# * [Encoding options](rdoc-ref:encodings.rdoc@Encoding+Options).
27182718
#
2719-
def self.read: (String name, ?Integer length, ?Integer offset, ?external_encoding: String | Encoding | nil, ?internal_encoding: String | Encoding | nil, ?encoding: String | Encoding | nil, ?textmode: boolish, ?binmode: boolish, ?autoclose: boolish, ?mode: String) -> String
2719+
def self.read: (String name, ?Integer? length, ?Integer offset, ?external_encoding: String | Encoding | nil, ?internal_encoding: String | Encoding | nil, ?encoding: String | Encoding | nil, ?textmode: boolish, ?binmode: boolish, ?autoclose: boolish, ?mode: String) -> String
27202720

27212721
# <!--
27222722
# rdoc-file=io.c

0 commit comments

Comments
 (0)