Skip to content

Commit

Permalink
Updated IO instance methods and a IO#{new,open}
Browse files Browse the repository at this point in the history
  • Loading branch information
sampersand committed Dec 21, 2023
1 parent 250a7e2 commit e328d88
Show file tree
Hide file tree
Showing 8 changed files with 3,103 additions and 2,341 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 e328d88

Please sign in to comment.