Skip to content

Commit

Permalink
Update IO instance methods
Browse files Browse the repository at this point in the history
  • Loading branch information
sampersand committed Dec 26, 2023
1 parent fea0932 commit 7fba7c8
Show file tree
Hide file tree
Showing 9 changed files with 3,214 additions and 2,388 deletions.
2 changes: 2 additions & 0 deletions core/builtin.rbs
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,7 @@ interface _Reader
def read: (?int? length, ?string outbuf) -> String?
end

%a{steep:deprecated} # now lives in `IO`
interface _ReaderPartial
def readpartial: (int maxlen, ?string outbuf) -> String
end
Expand All @@ -192,6 +193,7 @@ interface _Writer
def write: (*_ToS data) -> Integer
end

%a{steep:deprecated} # not used at all
interface _Rewindable
# Positions the stream to the beginning of input, resetting `lineno` to zero.
#
Expand Down
7 changes: 7 additions & 0 deletions core/encoding.rbs
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,13 @@
# useful when you use other ASCII-compatible encodings.
#
class Encoding
# The `_EncodeFallbackAref` is used in functions such as `String::encode` to get the fallback
# value when a charcater can't be converted between encodings.
interface _EncodeFallbackAref
# Returns a string to use as a replacement, or `nil` if a replacement isn't possible.
def []: (String) -> string?
end

def self._load: [T] (T) -> T

# <!--
Expand Down
Loading

0 comments on commit 7fba7c8

Please sign in to comment.