Skip to content

Commit 7fba7c8

Browse files
committed
Update IO instance methods
1 parent fea0932 commit 7fba7c8

File tree

9 files changed

+3214
-2388
lines changed

9 files changed

+3214
-2388
lines changed

core/builtin.rbs

+2
Original file line numberDiff line numberDiff line change
@@ -182,6 +182,7 @@ interface _Reader
182182
def read: (?int? length, ?string outbuf) -> String?
183183
end
184184

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

196+
%a{steep:deprecated} # not used at all
195197
interface _Rewindable
196198
# Positions the stream to the beginning of input, resetting `lineno` to zero.
197199
#

core/encoding.rbs

+7
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,13 @@
2828
# useful when you use other ASCII-compatible encodings.
2929
#
3030
class Encoding
31+
# The `_EncodeFallbackAref` is used in functions such as `String::encode` to get the fallback
32+
# value when a charcater can't be converted between encodings.
33+
interface _EncodeFallbackAref
34+
# Returns a string to use as a replacement, or `nil` if a replacement isn't possible.
35+
def []: (String) -> string?
36+
end
37+
3138
def self._load: [T] (T) -> T
3239

3340
# <!--

0 commit comments

Comments
 (0)