Skip to content

Commit fbe0790

Browse files
committed
Rename to reduce top-level interface
from _JsonReadableIO to JSON::_ReadableIO from _JsonRead to JSON::_Read
1 parent 281ca29 commit fbe0790

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

stdlib/json/0/json.rbs

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -12,14 +12,6 @@ interface _JsonWrite
1212
def flush: () -> void
1313
end
1414

15-
interface _JsonReadableIO
16-
def to_io: () -> _JsonRead
17-
end
18-
19-
interface _JsonRead
20-
def read: () -> string
21-
end
22-
2315
# <!-- rdoc-file=ext/json/lib/json/common.rb -->
2416
# The base exception for JSON errors.
2517
#
@@ -674,6 +666,14 @@ module JSON
674666
type parser = singleton(::JSON::Ext::Parser) | singleton(::JSON::Pure::Parser)
675667
type state = singleton(JSON::Ext::Generator::State) | singleton(JSON::Pure::Generator::State)
676668

669+
interface _ReadableIO
670+
def to_io: () -> _Read
671+
end
672+
673+
interface _Read
674+
def read: () -> string
675+
end
676+
677677
# <!--
678678
# rdoc-file=ext/json/lib/json/common.rb
679679
# - JSON[object] -> new_array or new_string
@@ -971,7 +971,7 @@ module JSON
971971
# #<Admin:0x00000000064c41f8
972972
# @attributes={"type"=>"Admin", "password"=>"0wn3d"}>}
973973
#
974-
def self?.load: (string | _JsonReadableIO | _JsonRead source, ?Proc proc, ?options options) -> untyped
974+
def self?.load: (string | _ReadableIO | _Read source, ?Proc proc, ?options options) -> untyped
975975

976976
# <!--
977977
# rdoc-file=ext/json/lib/json/common.rb

0 commit comments

Comments
 (0)