Skip to content

Commit

Permalink
Fix io#read
Browse files Browse the repository at this point in the history
It always returns `String` if `length` is not given or `nil` is given.
  • Loading branch information
soutaro committed Dec 20, 2023
1 parent 851c63b commit 75b97a6
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion core/io.rbs
Original file line number Diff line number Diff line change
Expand Up @@ -1532,7 +1532,8 @@ class IO < Object
#
# Related: IO#write.
#
def read: (?int? length, ?string outbuf) -> String?
def read: (?nil, ?string outbuf) -> String
| (int? length, ?string outbuf) -> String?

# <!--
# rdoc-file=io.rb
Expand Down

0 comments on commit 75b97a6

Please sign in to comment.