rbs 3.2.2 → 3.3.0.pre.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.github/workflows/comments.yml +1 -1
- data/.github/workflows/ruby.yml +7 -2
- data/CHANGELOG.md +85 -0
- data/Gemfile.lock +14 -14
- data/README.md +11 -2
- data/Rakefile +10 -7
- data/Steepfile +7 -7
- data/core/basic_object.rbs +7 -7
- data/core/binding.rbs +3 -3
- data/core/builtin.rbs +171 -5
- data/core/constants.rbs +17 -17
- data/core/dir.rbs +3 -3
- data/core/encoding.rbs +434 -628
- data/core/enumerator.rbs +37 -0
- data/core/exception.rbs +11 -11
- data/core/false_class.rbs +5 -11
- data/core/fiber.rbs +3 -3
- data/core/file_test.rbs +28 -26
- data/core/kernel.rbs +900 -21
- data/core/marshal.rbs +24 -14
- data/core/match_data.rbs +8 -8
- data/core/math.rbs +57 -53
- data/core/method.rbs +3 -1
- data/core/module.rbs +38 -36
- data/core/nil_class.rbs +7 -13
- data/core/object.rbs +3 -966
- data/core/process.rbs +3 -3
- data/core/ractor.rbs +2 -2
- data/core/rb_config.rbs +64 -43
- data/core/regexp.rbs +3 -3
- data/core/signal.rbs +10 -4
- data/core/struct.rbs +1 -1
- data/core/thread.rbs +7 -7
- data/core/thread_group.rbs +9 -9
- data/core/true_class.rbs +5 -11
- data/core/unbound_method.rbs +56 -7
- data/core/warning.rbs +33 -0
- data/docs/collection.md +56 -6
- data/docs/data_and_struct.md +57 -0
- data/docs/stdlib.md +61 -2
- data/docs/syntax.md +123 -2
- data/ext/rbs_extension/lexer.c +624 -569
- data/ext/rbs_extension/lexer.h +1 -0
- data/ext/rbs_extension/lexer.re +1 -0
- data/ext/rbs_extension/lexstate.c +1 -0
- data/ext/rbs_extension/parser.c +6 -0
- data/goodcheck.yml +2 -2
- data/lib/rbs/annotate/formatter.rb +13 -3
- data/lib/rbs/annotate/rdoc_source.rb +10 -1
- data/lib/rbs/cli/colored_io.rb +48 -0
- data/lib/rbs/cli/diff.rb +80 -0
- data/lib/rbs/cli.rb +151 -16
- data/lib/rbs/collection/config/lockfile.rb +0 -25
- data/lib/rbs/collection/config/lockfile_generator.rb +0 -6
- data/lib/rbs/collection/installer.rb +1 -1
- data/lib/rbs/collection/sources/git.rb +6 -4
- data/lib/rbs/collection/sources/local.rb +7 -5
- data/lib/rbs/diff.rb +104 -0
- data/lib/rbs/environment.rb +1 -1
- data/lib/rbs/method_type.rb +23 -0
- data/lib/rbs/prototype/rb.rb +2 -9
- data/lib/rbs/prototype/runtime/helpers.rb +59 -0
- data/lib/rbs/prototype/runtime/value_object_generator.rb +236 -0
- data/lib/rbs/prototype/runtime.rb +234 -150
- data/lib/rbs/sorter.rb +144 -117
- data/lib/rbs/test/guaranteed.rb +31 -0
- data/lib/rbs/test/type_check.rb +4 -4
- data/lib/rbs/test.rb +3 -0
- data/lib/rbs/types.rb +184 -3
- data/lib/rbs/version.rb +1 -1
- data/lib/rbs/writer.rb +4 -4
- data/lib/rbs.rb +1 -0
- data/rbs.gemspec +1 -0
- data/sig/annotate/formatter.rbs +2 -2
- data/sig/annotate/rdoc_annotater.rbs +1 -1
- data/sig/cli/colored_io.rbs +15 -0
- data/sig/cli/diff.rbs +21 -0
- data/sig/cli.rbs +2 -0
- data/sig/collection/config/lockfile.rbs +0 -6
- data/sig/diff.rbs +23 -0
- data/sig/errors.rbs +1 -5
- data/sig/method_types.rbs +6 -0
- data/sig/prototype/runtime.rbs +108 -0
- data/sig/rdoc/rbs.rbs +4 -0
- data/sig/shims/bundler.rbs +5 -0
- data/sig/sorter.rbs +23 -5
- data/sig/types.rbs +29 -0
- data/stdlib/benchmark/0/benchmark.rbs +1 -1
- data/stdlib/cgi/0/core.rbs +2 -2
- data/stdlib/did_you_mean/0/did_you_mean.rbs +2 -2
- data/stdlib/digest/0/digest.rbs +1 -1
- data/stdlib/fileutils/0/fileutils.rbs +1 -1
- data/stdlib/forwardable/0/forwardable.rbs +4 -4
- data/stdlib/io-console/0/io-console.rbs +1 -1
- data/stdlib/json/0/json.rbs +37 -0
- data/stdlib/logger/0/logger.rbs +2 -2
- data/stdlib/net-http/0/manifest.yaml +1 -1
- data/stdlib/net-http/0/net-http.rbs +16 -63
- data/stdlib/net-protocol/0/manifest.yaml +2 -0
- data/stdlib/net-protocol/0/net-protocol.rbs +56 -0
- data/stdlib/openssl/0/openssl.rbs +1 -1
- data/stdlib/pp/0/manifest.yaml +2 -0
- data/stdlib/pp/0/pp.rbs +301 -0
- data/stdlib/{yaml → psych}/0/dbm.rbs +3 -3
- data/stdlib/psych/0/manifest.yaml +3 -0
- data/stdlib/psych/0/psych.rbs +391 -0
- data/stdlib/{yaml → psych}/0/store.rbs +2 -2
- data/stdlib/rdoc/0/code_object.rbs +55 -0
- data/stdlib/rdoc/0/comment.rbs +60 -0
- data/stdlib/rdoc/0/context.rbs +153 -0
- data/stdlib/rdoc/0/markup.rbs +119 -0
- data/stdlib/rdoc/0/parser.rbs +56 -0
- data/stdlib/rdoc/0/rdoc.rbs +0 -372
- data/stdlib/rdoc/0/ri.rbs +17 -0
- data/stdlib/rdoc/0/store.rbs +48 -0
- data/stdlib/rdoc/0/top_level.rbs +97 -0
- data/stdlib/socket/0/basic_socket.rbs +1 -1
- data/stdlib/socket/0/socket.rbs +1 -1
- data/stdlib/uri/0/common.rbs +1 -1
- data/stdlib/yaml/0/manifest.yaml +1 -2
- data/stdlib/yaml/0/yaml.rbs +1 -199
- metadata +46 -9
- data/sig/shims/pp.rbs +0 -3
- data/sig/shims.rbs +0 -47
data/lib/rbs.rb
CHANGED
|
@@ -30,6 +30,7 @@ require "rbs/definition"
|
|
|
30
30
|
require "rbs/definition_builder"
|
|
31
31
|
require "rbs/definition_builder/ancestor_builder"
|
|
32
32
|
require "rbs/definition_builder/method_builder"
|
|
33
|
+
require "rbs/diff"
|
|
33
34
|
require "rbs/variance_calculator"
|
|
34
35
|
require "rbs/substitution"
|
|
35
36
|
require "rbs/constant"
|
data/rbs.gemspec
CHANGED
data/sig/annotate/formatter.rbs
CHANGED
|
@@ -17,8 +17,8 @@ module RBS
|
|
|
17
17
|
|
|
18
18
|
def self.translate: (RDoc::Markup::Document) -> String?
|
|
19
19
|
|
|
20
|
-
def self.each_part: (RDoc::Markup::Document) { (RDoc::Markup::Document) -> void } -> void
|
|
21
|
-
| (RDoc::Markup::Document) -> Enumerator[RDoc::Markup::Document, void]
|
|
20
|
+
def self.each_part: (RDoc::Markup::Document | RDoc::Comment | String) { (RDoc::Markup::Document) -> void } -> void
|
|
21
|
+
| (RDoc::Markup::Document | RDoc::Comment | String) -> Enumerator[RDoc::Markup::Document, void]
|
|
22
22
|
end
|
|
23
23
|
end
|
|
24
24
|
end
|
|
@@ -17,7 +17,7 @@ module RBS
|
|
|
17
17
|
end
|
|
18
18
|
|
|
19
19
|
interface _WithRDocComment
|
|
20
|
-
def comment: () -> RDoc::Markup::Document
|
|
20
|
+
def comment: () -> (RDoc::Markup::Document | RDoc::Comment | String)
|
|
21
21
|
end
|
|
22
22
|
|
|
23
23
|
def each_part: (Array[Object & _WithRDocComment], tester: _PathTester) { ([RDoc::Markup::Document, Object & _WithRDocComment]) -> void } -> void
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
module RBS
|
|
2
|
+
class CLI
|
|
3
|
+
class ColoredIO
|
|
4
|
+
attr_reader stdout: CLI::_IO
|
|
5
|
+
def initialize: (stdout: CLI::_IO) -> void
|
|
6
|
+
def puts_green: (String) -> void
|
|
7
|
+
def puts_red: (String) -> void
|
|
8
|
+
def puts: (?String) -> void
|
|
9
|
+
|
|
10
|
+
private def can_display_colors?: () -> bool
|
|
11
|
+
private def are_colors_supported?: () -> bool
|
|
12
|
+
private def are_colors_disabled?: () -> bool
|
|
13
|
+
end
|
|
14
|
+
end
|
|
15
|
+
end
|
data/sig/cli/diff.rbs
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
module RBS
|
|
2
|
+
class CLI
|
|
3
|
+
class Diff
|
|
4
|
+
@format: String
|
|
5
|
+
@stdout: _IO
|
|
6
|
+
@stderr: _IO
|
|
7
|
+
@diff: RBS::Diff
|
|
8
|
+
|
|
9
|
+
def initialize: (
|
|
10
|
+
argv: Array[String],
|
|
11
|
+
library_options: RBS::CLI::LibraryOptions,
|
|
12
|
+
?stdout: _IO,
|
|
13
|
+
?stderr: _IO,
|
|
14
|
+
) -> void
|
|
15
|
+
|
|
16
|
+
def run: () -> void
|
|
17
|
+
def run_diff: () -> void
|
|
18
|
+
def run_markdown: () -> void
|
|
19
|
+
end
|
|
20
|
+
end
|
|
21
|
+
end
|
data/sig/cli.rbs
CHANGED
|
@@ -7,7 +7,6 @@ module RBS
|
|
|
7
7
|
# Data structure stored in `rbs_collection.lock.yaml`
|
|
8
8
|
#
|
|
9
9
|
type lockfile_data = {
|
|
10
|
-
"sources" => Array[Sources::Git::source_entry]?, # null if empty
|
|
11
10
|
"path" => String,
|
|
12
11
|
"gems" => Array[library_data]?, # null if empty
|
|
13
12
|
"gemfile_lock_path" => String? # gemfile_lock_path is optional because older versions doesn't have it
|
|
@@ -43,8 +42,6 @@ module RBS
|
|
|
43
42
|
#
|
|
44
43
|
attr_reader gemfile_lock_path: Pathname?
|
|
45
44
|
|
|
46
|
-
attr_reader sources: Hash[String, Sources::Git]
|
|
47
|
-
|
|
48
45
|
attr_reader gems: Hash[String, library]
|
|
49
46
|
|
|
50
47
|
def initialize: (lockfile_path: Pathname, path: Pathname, gemfile_lock_path: Pathname?) -> void
|
|
@@ -59,9 +56,6 @@ module RBS
|
|
|
59
56
|
|
|
60
57
|
def to_lockfile: () -> lockfile_data
|
|
61
58
|
|
|
62
|
-
def each_source: () { (Sources::t) -> void } -> void
|
|
63
|
-
| () -> Enumerator[Sources::t, void]
|
|
64
|
-
|
|
65
59
|
def self.from_lockfile: (lockfile_path: Pathname, data: lockfile_data) -> Lockfile
|
|
66
60
|
|
|
67
61
|
# Validates if directories are set up correctly
|
data/sig/diff.rbs
ADDED
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
module RBS
|
|
2
|
+
class Diff
|
|
3
|
+
@type_name: TypeName
|
|
4
|
+
@library_options: RBS::CLI::LibraryOptions
|
|
5
|
+
@after_path: Array[String]
|
|
6
|
+
@before_path: Array[String]
|
|
7
|
+
|
|
8
|
+
def initialize: (
|
|
9
|
+
type_name: TypeName,
|
|
10
|
+
library_options: RBS::CLI::LibraryOptions,
|
|
11
|
+
?after_path: Array[String],
|
|
12
|
+
?before_path: Array[String]
|
|
13
|
+
) -> void
|
|
14
|
+
|
|
15
|
+
def each_diff: () { (String before, String after) -> void } -> void
|
|
16
|
+
|
|
17
|
+
private def each_diff_by: (Symbol kind, Hash[::Symbol, Definition::Method] before_methods, Hash[::Symbol, Definition::Method] after_methods) { (String before, String after) -> void } -> void
|
|
18
|
+
private def build_methods: (Array[String] path) -> [ Hash[::Symbol, Definition::Method], Hash[::Symbol, Definition::Method] ]
|
|
19
|
+
private def build_env: (Array[String] path) -> Environment
|
|
20
|
+
private def build_builder: (Environment env) -> DefinitionBuilder
|
|
21
|
+
private def definition_method_to_s: (Symbol key, Symbol kind, Definition::Method definition_method) -> String?
|
|
22
|
+
end
|
|
23
|
+
end
|
data/sig/errors.rbs
CHANGED
|
@@ -20,11 +20,7 @@ module RBS
|
|
|
20
20
|
%a{pure} def location: () -> Location[untyped, untyped]?
|
|
21
21
|
end
|
|
22
22
|
|
|
23
|
-
|
|
24
|
-
def detailed_message: (**untyped) -> String
|
|
25
|
-
end
|
|
26
|
-
|
|
27
|
-
module DetailedMessageable : _Location, _DetailedMessage
|
|
23
|
+
module DetailedMessageable : _Location, Exception
|
|
28
24
|
def detailed_message: (?highlight: boolish, **untyped) -> String
|
|
29
25
|
end
|
|
30
26
|
|
data/sig/method_types.rbs
CHANGED
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
module RBS
|
|
2
|
+
module Prototype
|
|
3
|
+
class Runtime
|
|
4
|
+
class Todo
|
|
5
|
+
@builder: DefinitionBuilder
|
|
6
|
+
|
|
7
|
+
@mixin_decls_cache: Hash[TypeName, Array[untyped]]
|
|
8
|
+
|
|
9
|
+
def initialize: (builder: DefinitionBuilder) -> void
|
|
10
|
+
|
|
11
|
+
def skip_mixin?: (type_name: TypeName, module_name: TypeName, mixin_class: mixin_class) -> bool
|
|
12
|
+
|
|
13
|
+
def skip_singleton_method?: (module_name: TypeName, name: Symbol) -> bool
|
|
14
|
+
|
|
15
|
+
def skip_instance_method?: (module_name: TypeName, name: Symbol) -> bool
|
|
16
|
+
|
|
17
|
+
def skip_constant?: (module_name: String, name: Symbol) -> bool
|
|
18
|
+
|
|
19
|
+
private def mixin_decls: (TypeName type_name) -> Array[AST::Members::Include | AST::Members::Extend | AST::Members::Prepend]
|
|
20
|
+
end
|
|
21
|
+
|
|
22
|
+
type mixin_class = singleton(AST::Members::Include) | singleton(AST::Members::Prepend) | singleton(AST::Members::Extend)
|
|
23
|
+
|
|
24
|
+
@decls: Array[AST::Declarations::t]?
|
|
25
|
+
|
|
26
|
+
@modules: Hash[String, Module]
|
|
27
|
+
|
|
28
|
+
@builder: DefinitionBuilder
|
|
29
|
+
|
|
30
|
+
@module_name_method: UnboundMethod
|
|
31
|
+
@object_class: UnboundMethod
|
|
32
|
+
|
|
33
|
+
@todo_object: Todo?
|
|
34
|
+
|
|
35
|
+
include Helpers
|
|
36
|
+
|
|
37
|
+
attr_reader patterns: Array[String]
|
|
38
|
+
|
|
39
|
+
attr_reader env: Environment
|
|
40
|
+
|
|
41
|
+
attr_reader merge: bool
|
|
42
|
+
|
|
43
|
+
attr_reader todo: bool
|
|
44
|
+
|
|
45
|
+
attr_accessor outline: bool
|
|
46
|
+
|
|
47
|
+
attr_reader owners_included: Array[Module]
|
|
48
|
+
|
|
49
|
+
def initialize: (patterns: Array[String], env: Environment, merge: bool, ?todo: bool, ?owners_included: Array[Symbol]) -> void
|
|
50
|
+
|
|
51
|
+
def target?: (Module const) -> bool
|
|
52
|
+
|
|
53
|
+
def todo_object: () -> Todo?
|
|
54
|
+
|
|
55
|
+
def builder: () -> DefinitionBuilder
|
|
56
|
+
|
|
57
|
+
def parse: (String file) -> void
|
|
58
|
+
|
|
59
|
+
def decls: () -> Array[AST::Declarations::t]
|
|
60
|
+
|
|
61
|
+
def to_type_name: (String name, ?full_name: bool) -> TypeName
|
|
62
|
+
|
|
63
|
+
def each_mixined_module: (TypeName type_name, Module mod) { (TypeName, TypeName, mixin_class) -> void } -> void
|
|
64
|
+
|
|
65
|
+
def each_mixined_module_one: (TypeName type_name, Module mod) { (TypeName, TypeName, bool) -> void } -> void
|
|
66
|
+
|
|
67
|
+
def method_type: (UnboundMethod method) -> MethodType
|
|
68
|
+
|
|
69
|
+
def merge_rbs: [A] (TypeName module_name, Array[AST::Declarations::Class::member] members, singleton: Symbol) { () -> A } -> A?
|
|
70
|
+
| [A] (TypeName module_name, Array[AST::Declarations::Class::member] members, instance: Symbol) { () -> A } -> A?
|
|
71
|
+
|
|
72
|
+
def target_method?: (Module mod, instance: Symbol) -> bool
|
|
73
|
+
| (Module mod, singleton: Symbol) -> bool
|
|
74
|
+
|
|
75
|
+
def generate_methods: (Module mod, TypeName module_name, Array[AST::Declarations::Class::member] members) -> void
|
|
76
|
+
|
|
77
|
+
def generate_constants: (Module mod, Array[AST::Declarations::Class::member] decls) -> void
|
|
78
|
+
|
|
79
|
+
def generate_super_class: (Class mod) -> AST::Declarations::Class::Super?
|
|
80
|
+
|
|
81
|
+
def generate_class: (Class mod) -> void
|
|
82
|
+
|
|
83
|
+
def generate_module: (Module mod) -> void
|
|
84
|
+
|
|
85
|
+
# Generate/find outer module declarations
|
|
86
|
+
# This is broken down into another method to comply with `DRY`
|
|
87
|
+
# This generates/finds declarations in nested form & returns the last array of declarations
|
|
88
|
+
def ensure_outer_module_declarations: (Module mod) -> Array[AST::Declarations::Class::member]
|
|
89
|
+
|
|
90
|
+
# Returns the exact name & not compactly declared name
|
|
91
|
+
def only_name: (Module mod) -> String
|
|
92
|
+
|
|
93
|
+
def const_name: (Module const) -> String?
|
|
94
|
+
|
|
95
|
+
def const_name!: (Module const) -> String
|
|
96
|
+
|
|
97
|
+
def object_class: (untyped) -> untyped
|
|
98
|
+
|
|
99
|
+
def type_args: (TypeName type_name) -> Array[Types::t]
|
|
100
|
+
|
|
101
|
+
def block_from_ast_of: (UnboundMethod method) -> Types::Block?
|
|
102
|
+
|
|
103
|
+
def can_alias?: (Module, UnboundMethod) -> bool
|
|
104
|
+
|
|
105
|
+
def type_params: (Module) -> Array[AST::TypeParam]
|
|
106
|
+
end
|
|
107
|
+
end
|
|
108
|
+
end
|
data/sig/rdoc/rbs.rbs
CHANGED
data/sig/shims/bundler.rbs
CHANGED
data/sig/sorter.rbs
CHANGED
|
@@ -14,10 +14,28 @@ module RBS
|
|
|
14
14
|
|
|
15
15
|
def run: () -> void
|
|
16
16
|
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
17
|
+
type partitioned = {
|
|
18
|
+
type_alias_decls: Array[AST::Declarations::TypeAlias],
|
|
19
|
+
constant_decls: Array[AST::Declarations::Constant],
|
|
20
|
+
class_decls: Array[AST::Declarations::Class | AST::Declarations::Module | AST::Declarations::Interface],
|
|
21
|
+
mixin_includes: Array[AST::Members::Include],
|
|
22
|
+
mixin_prepends: Array[AST::Members::Prepend],
|
|
23
|
+
mixin_extends: Array[AST::Members::Extend],
|
|
24
|
+
class_variables: Array[AST::Members::ClassVariable],
|
|
25
|
+
class_instance_variables: Array[AST::Members::ClassInstanceVariable],
|
|
26
|
+
instance_variables: Array[AST::Members::InstanceVariable],
|
|
27
|
+
singleton_attributes: Array[AST::Members::AttrAccessor | AST::Members::AttrWriter | AST::Members::AttrReader],
|
|
28
|
+
instance_attributes: Array[AST::Members::AttrAccessor | AST::Members::AttrWriter | AST::Members::AttrReader],
|
|
29
|
+
module_functions: Array[AST::Members::MethodDefinition],
|
|
30
|
+
singleton_new_methods: Array[AST::Members::MethodDefinition],
|
|
31
|
+
public_singleton_methods: Array[AST::Members::MethodDefinition | AST::Members::Alias],
|
|
32
|
+
private_singleton_methods: Array[AST::Members::MethodDefinition],
|
|
33
|
+
instance_initialize_methods: Array[AST::Members::MethodDefinition],
|
|
34
|
+
public_instance_methods: Array[AST::Members::MethodDefinition | AST::Members::Alias],
|
|
35
|
+
private_instance_methods: Array[AST::Members::MethodDefinition],
|
|
36
|
+
other_decls: Array[member]
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
def sort_decl!: (member decl) -> void
|
|
22
40
|
end
|
|
23
41
|
end
|
data/sig/types.rbs
CHANGED
|
@@ -41,6 +41,20 @@ module RBS
|
|
|
41
41
|
# ```
|
|
42
42
|
#
|
|
43
43
|
def to_s: (?Integer level) -> String
|
|
44
|
+
|
|
45
|
+
# Returns `true` if it has `self` type
|
|
46
|
+
#
|
|
47
|
+
def has_self_type?: () -> bool
|
|
48
|
+
|
|
49
|
+
# Returns `true` if it has `instance` or `class` types
|
|
50
|
+
def has_classish_type?: () -> bool
|
|
51
|
+
|
|
52
|
+
# Returns `true` if it has `void` types other than *return* position
|
|
53
|
+
#
|
|
54
|
+
# * The function return type is a return position (`() -> void`)
|
|
55
|
+
# * Generic parameter is a return position (`Enumerator[Integer, void]`)
|
|
56
|
+
#
|
|
57
|
+
def with_nonreturn_void?: () -> bool
|
|
44
58
|
end
|
|
45
59
|
|
|
46
60
|
# t represents union of all possible types.
|
|
@@ -97,6 +111,9 @@ module RBS
|
|
|
97
111
|
end
|
|
98
112
|
|
|
99
113
|
class Any < Base
|
|
114
|
+
@string: String?
|
|
115
|
+
|
|
116
|
+
def todo!: () -> self
|
|
100
117
|
end
|
|
101
118
|
|
|
102
119
|
class Nil < Base
|
|
@@ -191,6 +208,12 @@ module RBS
|
|
|
191
208
|
|
|
192
209
|
def each_type: () { (t) -> void } -> void
|
|
193
210
|
| () -> Enumerator[t, void]
|
|
211
|
+
|
|
212
|
+
def has_self_type?: () -> bool
|
|
213
|
+
|
|
214
|
+
def has_classish_type?: () -> bool
|
|
215
|
+
|
|
216
|
+
def with_nonreturn_void?: () -> bool
|
|
194
217
|
end
|
|
195
218
|
|
|
196
219
|
class Interface
|
|
@@ -412,6 +435,12 @@ module RBS
|
|
|
412
435
|
def amap: [A, B] (Array[A]) { (A) -> B } -> Array[B]
|
|
413
436
|
|
|
414
437
|
def hmapv: [X, Y, Z] (Hash[X, Y]) { (Y) -> Z } -> Hash[X, Z]
|
|
438
|
+
|
|
439
|
+
def has_self_type?: () -> bool
|
|
440
|
+
|
|
441
|
+
def has_classish_type?: () -> bool
|
|
442
|
+
|
|
443
|
+
def with_nonreturn_void?: () -> bool
|
|
415
444
|
end
|
|
416
445
|
|
|
417
446
|
class Block
|
|
@@ -146,7 +146,7 @@ module Benchmark
|
|
|
146
146
|
# >total: 2.930000 0.000000 2.930000 ( 2.932889)
|
|
147
147
|
# >avg: 0.976667 0.000000 0.976667 ( 0.977630)
|
|
148
148
|
#
|
|
149
|
-
def self?.benchmark: (String caption, ?Integer? label_width, ?String? format, *String labels) { (Report report) -> (Array[Tms] |
|
|
149
|
+
def self?.benchmark: (String caption, ?Integer? label_width, ?String? format, *String labels) { (Report report) -> (Array[Tms] | untyped) } -> Array[Tms]
|
|
150
150
|
|
|
151
151
|
# <!--
|
|
152
152
|
# rdoc-file=lib/benchmark.rb
|
data/stdlib/cgi/0/core.rbs
CHANGED
|
@@ -515,7 +515,7 @@ class CGI
|
|
|
515
515
|
# This method does not perform charset conversion.
|
|
516
516
|
#
|
|
517
517
|
def http_header: (?String options) -> String
|
|
518
|
-
| (?Hash[
|
|
518
|
+
| (?Hash[interned, untyped] header_hash) -> String
|
|
519
519
|
|
|
520
520
|
def nph?: () -> untyped
|
|
521
521
|
|
|
@@ -586,7 +586,7 @@ class CGI
|
|
|
586
586
|
# # string
|
|
587
587
|
#
|
|
588
588
|
def out: (?String content_type_string) { () -> String } -> void
|
|
589
|
-
| (Hash[
|
|
589
|
+
| (Hash[interned, untyped] headers_hash) { () -> String } -> void
|
|
590
590
|
|
|
591
591
|
# <!--
|
|
592
592
|
# rdoc-file=lib/cgi/core.rb
|
|
@@ -266,14 +266,14 @@ module DidYouMean
|
|
|
266
266
|
# - new(dictionary:)
|
|
267
267
|
# -->
|
|
268
268
|
#
|
|
269
|
-
def initialize: (dictionary: Array[
|
|
269
|
+
def initialize: (dictionary: Array[interned]) -> void
|
|
270
270
|
|
|
271
271
|
# <!--
|
|
272
272
|
# rdoc-file=lib/did_you_mean/spell_checker.rb
|
|
273
273
|
# - correct(input)
|
|
274
274
|
# -->
|
|
275
275
|
#
|
|
276
|
-
def correct: (
|
|
276
|
+
def correct: (interned input) -> Array[String]
|
|
277
277
|
end
|
|
278
278
|
|
|
279
279
|
# <!-- rdoc-file=lib/did_you_mean/tree_spell_checker.rb -->
|
data/stdlib/digest/0/digest.rbs
CHANGED
|
@@ -1507,7 +1507,7 @@ module FileUtils
|
|
|
1507
1507
|
#
|
|
1508
1508
|
# Related: [methods for deleting](rdoc-ref:FileUtils@Deleting).
|
|
1509
1509
|
#
|
|
1510
|
-
def self?.remove_file: (path path, ?
|
|
1510
|
+
def self?.remove_file: (path path, ?boolish force) -> void
|
|
1511
1511
|
|
|
1512
1512
|
# <!--
|
|
1513
1513
|
# rdoc-file=lib/fileutils.rb
|
|
@@ -134,7 +134,7 @@ module Forwardable
|
|
|
134
134
|
# def_delegator :@records, :<<
|
|
135
135
|
# def_delegator :@records, :map
|
|
136
136
|
#
|
|
137
|
-
def def_instance_delegators: (
|
|
137
|
+
def def_instance_delegators: (interned accessor, *Symbol methods) -> void
|
|
138
138
|
|
|
139
139
|
# <!--
|
|
140
140
|
# rdoc-file=lib/forwardable.rb
|
|
@@ -171,7 +171,7 @@ module Forwardable
|
|
|
171
171
|
# q.push 23 #=> NoMethodError
|
|
172
172
|
# q.to_i #=> 1
|
|
173
173
|
#
|
|
174
|
-
def def_instance_delegator: (
|
|
174
|
+
def def_instance_delegator: (interned accessor, Symbol method, ?Symbol ali) -> void
|
|
175
175
|
|
|
176
176
|
# <!--
|
|
177
177
|
# rdoc-file=lib/forwardable.rb
|
|
@@ -240,7 +240,7 @@ module SingleForwardable
|
|
|
240
240
|
# def_delegator :@records, :<<
|
|
241
241
|
# def_delegator :@records, :map
|
|
242
242
|
#
|
|
243
|
-
def def_single_delegators: (
|
|
243
|
+
def def_single_delegators: (interned accessor, *Symbol methods) -> void
|
|
244
244
|
|
|
245
245
|
# <!--
|
|
246
246
|
# rdoc-file=lib/forwardable.rb
|
|
@@ -257,7 +257,7 @@ module SingleForwardable
|
|
|
257
257
|
# method of the same name in *accessor*). If *new_name* is provided, it is used
|
|
258
258
|
# as the name for the delegate method. Returns the name of the method defined.
|
|
259
259
|
#
|
|
260
|
-
def def_single_delegator: (
|
|
260
|
+
def def_single_delegator: (interned accessor, Symbol method, ?Symbol ali) -> void
|
|
261
261
|
|
|
262
262
|
# <!--
|
|
263
263
|
# rdoc-file=lib/forwardable.rb
|
data/stdlib/json/0/json.rbs
CHANGED
|
@@ -1164,6 +1164,43 @@ JSON::VERSION_MAJOR: Integer
|
|
|
1164
1164
|
|
|
1165
1165
|
JSON::VERSION_MINOR: Integer
|
|
1166
1166
|
|
|
1167
|
+
%a{annotate:rdoc:skip}
|
|
1168
|
+
module Kernel
|
|
1169
|
+
private
|
|
1170
|
+
|
|
1171
|
+
# <!--
|
|
1172
|
+
# rdoc-file=ext/json/lib/json/common.rb
|
|
1173
|
+
# - j(*objs)
|
|
1174
|
+
# -->
|
|
1175
|
+
# Outputs *objs* to STDOUT as JSON strings in the shortest form, that is in one
|
|
1176
|
+
# line.
|
|
1177
|
+
#
|
|
1178
|
+
def j: (*_ToJson) -> nil
|
|
1179
|
+
|
|
1180
|
+
# <!--
|
|
1181
|
+
# rdoc-file=ext/json/lib/json/common.rb
|
|
1182
|
+
# - jj(*objs)
|
|
1183
|
+
# -->
|
|
1184
|
+
# Outputs *objs* to STDOUT as JSON strings in a pretty format, with indentation
|
|
1185
|
+
# and over many lines.
|
|
1186
|
+
#
|
|
1187
|
+
def jj: (*_ToJson) -> nil
|
|
1188
|
+
|
|
1189
|
+
# <!--
|
|
1190
|
+
# rdoc-file=ext/json/lib/json/common.rb
|
|
1191
|
+
# - JSON(object, *args)
|
|
1192
|
+
# -->
|
|
1193
|
+
# If *object* is string-like, parse the string and return the parsed result as a
|
|
1194
|
+
# Ruby data structure. Otherwise, generate a JSON text from the Ruby data
|
|
1195
|
+
# structure object and return it.
|
|
1196
|
+
#
|
|
1197
|
+
# The *opts* argument is passed through to generate/parse respectively. See
|
|
1198
|
+
# generate and parse for their documentation.
|
|
1199
|
+
#
|
|
1200
|
+
def JSON: (string source, ?json_options opts) -> untyped
|
|
1201
|
+
| (_ToJson obj, ?json_options opts) -> String
|
|
1202
|
+
end
|
|
1203
|
+
|
|
1167
1204
|
%a{annotate:rdoc:skip}
|
|
1168
1205
|
class Object
|
|
1169
1206
|
# Converts this object to a string (calling #to_s), converts
|
data/stdlib/logger/0/logger.rbs
CHANGED
|
@@ -640,7 +640,7 @@ class Logger
|
|
|
640
640
|
#
|
|
641
641
|
# Logger#sev_threshold= is an alias for Logger#level=.
|
|
642
642
|
#
|
|
643
|
-
def level=: (Integer |
|
|
643
|
+
def level=: (Integer | interned severity) -> Integer
|
|
644
644
|
|
|
645
645
|
# <!--
|
|
646
646
|
# rdoc-file=lib/logger.rb
|
|
@@ -796,7 +796,7 @@ class Logger
|
|
|
796
796
|
# periodic log file rotation; default is `'%Y%m%d'`. See [Periodic
|
|
797
797
|
# Rotation](rdoc-ref:Logger@Periodic+Rotation).
|
|
798
798
|
#
|
|
799
|
-
def initialize: (logdev? logdev, ?Numeric | String shift_age, ?Integer shift_size, ?shift_period_suffix: String, ?binmode: boolish, ?datetime_format: String, ?formatter: _Formatter, ?progname: String, ?level: Integer |
|
|
799
|
+
def initialize: (logdev? logdev, ?Numeric | String shift_age, ?Integer shift_size, ?shift_period_suffix: String, ?binmode: boolish, ?datetime_format: String, ?formatter: _Formatter, ?progname: String, ?level: Integer | interned) -> void
|
|
800
800
|
end
|
|
801
801
|
|
|
802
802
|
Logger::ProgName: String
|