rbs 3.7.0.dev.1 → 3.7.0.pre.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/ruby.yml +1 -1
- data/.github/workflows/windows.yml +5 -3
- data/.gitignore +1 -0
- data/.rubocop.yml +6 -0
- data/CHANGELOG.md +47 -0
- data/Rakefile +23 -0
- data/config.yml +311 -0
- data/core/dir.rbs +1 -1
- data/core/kernel.rbs +2 -2
- data/core/process.rbs +1 -1
- data/core/set.rbs +1 -1
- data/docs/syntax.md +6 -4
- data/ext/rbs_extension/extconf.rb +10 -0
- data/ext/rbs_extension/parser.c +103 -110
- data/ext/rbs_extension/rbs_extension.h +1 -2
- data/{ext/rbs_extension → include/rbs}/constants.h +21 -19
- data/include/rbs/ruby_objs.h +72 -0
- data/include/rbs.h +7 -0
- data/lib/rbs/collection/config/lockfile_generator.rb +34 -5
- data/lib/rbs/collection/config.rb +2 -2
- data/lib/rbs/environment_loader.rb +5 -0
- data/lib/rbs/prototype/rb.rb +7 -3
- data/lib/rbs/types.rb +10 -3
- data/lib/rbs/version.rb +1 -1
- data/sig/ancestor_graph.rbs +1 -1
- data/sig/collection/config/lockfile_generator.rbs +9 -1
- data/sig/definition.rbs +1 -1
- data/sig/definition_builder.rbs +1 -1
- data/sig/environment.rbs +1 -1
- data/sig/prototype/rb.rbs +1 -1
- data/sig/type_alias_dependency.rbs +2 -2
- data/sig/type_alias_regularity.rbs +1 -1
- data/sig/type_param.rbs +3 -3
- data/sig/vendorer.rbs +1 -1
- data/{ext/rbs_extension → src}/constants.c +35 -36
- data/src/ruby_objs.c +793 -0
- data/stdlib/cgi/0/manifest.yaml +1 -0
- data/stdlib/csv/0/manifest.yaml +1 -0
- data/stdlib/did_you_mean/0/did_you_mean.rbs +1 -1
- data/stdlib/json/0/json.rbs +1 -1
- data/stdlib/minitest/0/kernel.rbs +2 -2
- data/stdlib/minitest/0/minitest/abstract_reporter.rbs +4 -1
- data/stdlib/minitest/0/minitest/assertion.rbs +1 -0
- data/stdlib/minitest/0/minitest/assertions.rbs +58 -13
- data/stdlib/minitest/0/minitest/backtrace_filter.rbs +7 -0
- data/stdlib/minitest/0/minitest/bench_spec.rbs +8 -8
- data/stdlib/minitest/0/minitest/benchmark.rbs +17 -16
- data/stdlib/minitest/0/minitest/compress.rbs +13 -0
- data/stdlib/minitest/0/minitest/error_on_warning.rbs +3 -0
- data/stdlib/minitest/0/minitest/mock.rbs +9 -5
- data/stdlib/minitest/0/minitest/parallel/executor.rbs +4 -0
- data/stdlib/minitest/0/minitest/parallel/test/class_methods.rbs +0 -1
- data/stdlib/minitest/0/minitest/pride_io.rbs +8 -0
- data/stdlib/minitest/0/minitest/pride_lol.rbs +2 -0
- data/stdlib/minitest/0/minitest/progress_reporter.rbs +1 -1
- data/stdlib/minitest/0/minitest/reportable.rbs +2 -0
- data/stdlib/minitest/0/minitest/runnable.rbs +33 -1
- data/stdlib/minitest/0/minitest/spec/dsl/instance_methods.rbs +1 -1
- data/stdlib/minitest/0/minitest/spec/dsl.rbs +10 -6
- data/stdlib/minitest/0/minitest/spec.rbs +1 -1
- data/stdlib/minitest/0/minitest/statistics_reporter.rbs +5 -0
- data/stdlib/minitest/0/minitest/summary_reporter.rbs +0 -7
- data/stdlib/minitest/0/minitest/test/lifecycle_hooks.rbs +1 -1
- data/stdlib/minitest/0/minitest/test.rbs +7 -14
- data/stdlib/minitest/0/minitest/unexpected_error.rbs +2 -0
- data/stdlib/minitest/0/minitest/unexpected_warning.rbs +6 -0
- data/stdlib/minitest/0/minitest/unit.rbs +1 -2
- data/stdlib/minitest/0/minitest.rbs +41 -892
- data/stdlib/open-uri/0/manifest.yaml +1 -0
- data/stdlib/openssl/0/manifest.yaml +1 -0
- data/stdlib/openssl/0/openssl.rbs +26 -1
- data/stdlib/psych/0/core_ext.rbs +12 -0
- data/templates/include/rbs/constants.h.erb +20 -0
- data/templates/include/rbs/ruby_objs.h.erb +10 -0
- data/templates/src/constants.c.erb +36 -0
- data/templates/src/ruby_objs.c.erb +27 -0
- data/templates/template.rb +122 -0
- metadata +19 -9
- data/ext/rbs_extension/ruby_objs.c +0 -602
- data/ext/rbs_extension/ruby_objs.h +0 -51
- data/stdlib/minitest/0/manifest.yaml +0 -2
- /data/{core/string_io.rbs → stdlib/stringio/0/stringio.rbs} +0 -0
@@ -2,6 +2,10 @@
|
|
2
2
|
# Oh look! A Minitest::Spec::DSL module! Eat your heart out DHH.
|
3
3
|
#
|
4
4
|
module Minitest::Spec::DSL
|
5
|
+
@children: untyped
|
6
|
+
|
7
|
+
@specs: untyped
|
8
|
+
|
5
9
|
# <!--
|
6
10
|
# rdoc-file=lib/minitest/spec.rb
|
7
11
|
# - register_spec_type(*args, &block)
|
@@ -20,7 +24,7 @@ module Minitest::Spec::DSL
|
|
20
24
|
# desc.superclass == ActiveRecord::Base
|
21
25
|
# end
|
22
26
|
#
|
23
|
-
def register_spec_type: (*untyped args) ?{ () -> untyped } -> untyped
|
27
|
+
def register_spec_type: (*untyped args) ?{ (?) -> untyped } -> untyped
|
24
28
|
|
25
29
|
# <!--
|
26
30
|
# rdoc-file=lib/minitest/spec.rb
|
@@ -48,7 +52,7 @@ module Minitest::Spec::DSL
|
|
48
52
|
#
|
49
53
|
# Equivalent to Minitest::Test#setup.
|
50
54
|
#
|
51
|
-
def before: (?untyped? _type)
|
55
|
+
def before: (?untyped? _type) { (?) -> untyped } -> untyped
|
52
56
|
|
53
57
|
# <!--
|
54
58
|
# rdoc-file=lib/minitest/spec.rb
|
@@ -60,7 +64,7 @@ module Minitest::Spec::DSL
|
|
60
64
|
#
|
61
65
|
# Equivalent to Minitest::Test#teardown.
|
62
66
|
#
|
63
|
-
def after: (?untyped? _type)
|
67
|
+
def after: (?untyped? _type) { (?) -> untyped } -> untyped
|
64
68
|
|
65
69
|
# <!--
|
66
70
|
# rdoc-file=lib/minitest/spec.rb
|
@@ -76,7 +80,7 @@ module Minitest::Spec::DSL
|
|
76
80
|
# Hint: If you *do* want inheritance, use minitest/test. You can mix and match
|
77
81
|
# between assertions and expectations as much as you want.
|
78
82
|
#
|
79
|
-
def it: (?::String desc) ?{ () -> untyped } -> untyped
|
83
|
+
def it: (?::String desc) ?{ (?) -> untyped } -> untyped
|
80
84
|
|
81
85
|
# <!--
|
82
86
|
# rdoc-file=lib/minitest/spec.rb
|
@@ -86,7 +90,7 @@ module Minitest::Spec::DSL
|
|
86
90
|
#
|
87
91
|
# Why use let instead of def? I honestly don't know.
|
88
92
|
#
|
89
|
-
def let: (untyped name)
|
93
|
+
def let: (untyped name) { (?) -> untyped } -> untyped
|
90
94
|
|
91
95
|
# <!--
|
92
96
|
# rdoc-file=lib/minitest/spec.rb
|
@@ -95,7 +99,7 @@ module Minitest::Spec::DSL
|
|
95
99
|
# Another lazy man's accessor generator. Made even more lazy by setting the name
|
96
100
|
# for you to `subject`.
|
97
101
|
#
|
98
|
-
def subject: ()
|
102
|
+
def subject: () { (?) -> untyped } -> untyped
|
99
103
|
|
100
104
|
def create: (untyped name, untyped desc) -> untyped
|
101
105
|
|
@@ -69,6 +69,11 @@ class Minitest::StatisticsReporter < ::Minitest::Reporter
|
|
69
69
|
#
|
70
70
|
attr_accessor errors: untyped
|
71
71
|
|
72
|
+
# <!-- rdoc-file=lib/minitest.rb -->
|
73
|
+
# Total number of tests that warned.
|
74
|
+
#
|
75
|
+
attr_accessor warnings: untyped
|
76
|
+
|
72
77
|
# <!-- rdoc-file=lib/minitest.rb -->
|
73
78
|
# Total number of tests that where skipped.
|
74
79
|
#
|
@@ -13,13 +13,6 @@ class Minitest::SummaryReporter < ::Minitest::StatisticsReporter
|
|
13
13
|
def aggregated_results: (untyped io) -> untyped
|
14
14
|
def to_s: () -> untyped
|
15
15
|
def summary: () -> untyped
|
16
|
-
|
17
|
-
# <!--
|
18
|
-
# rdoc-file=lib/minitest.rb
|
19
|
-
# - binary_string()
|
20
|
-
# -->
|
21
|
-
#
|
22
|
-
private def binary_string: () -> untyped
|
23
16
|
attr_accessor sync: untyped
|
24
17
|
attr_accessor old_sync: untyped
|
25
18
|
end
|
@@ -31,9 +31,9 @@ class Minitest::Test < ::Minitest::Runnable
|
|
31
31
|
# rdoc-file=lib/minitest/test.rb
|
32
32
|
# - parallelize_me!()
|
33
33
|
# -->
|
34
|
-
# Call this at the top of your tests
|
35
|
-
#
|
36
|
-
# awesome.
|
34
|
+
# Call this at the top of your tests (inside the `Minitest::Test` subclass or
|
35
|
+
# `describe` block) when you want to run your tests in parallel. In doing so,
|
36
|
+
# you're admitting that you rule and your tests are awesome.
|
37
37
|
#
|
38
38
|
def self.parallelize_me!: () -> untyped
|
39
39
|
|
@@ -46,15 +46,6 @@ class Minitest::Test < ::Minitest::Runnable
|
|
46
46
|
#
|
47
47
|
def self.runnable_methods: () -> untyped
|
48
48
|
|
49
|
-
# <!--
|
50
|
-
# rdoc-file=lib/minitest/test.rb
|
51
|
-
# - test_order()
|
52
|
-
# -->
|
53
|
-
# Defines the order to run tests (:random by default). Override this or use a
|
54
|
-
# convenience method to change it for your tests.
|
55
|
-
#
|
56
|
-
def self.test_order: () -> :random
|
57
|
-
|
58
49
|
# <!--
|
59
50
|
# rdoc-file=lib/minitest/test.rb
|
60
51
|
# - run()
|
@@ -64,13 +55,15 @@ class Minitest::Test < ::Minitest::Runnable
|
|
64
55
|
def run: () -> untyped
|
65
56
|
def capture_exceptions: () { () -> untyped } -> untyped
|
66
57
|
def sanitize_exception: (untyped e) -> untyped
|
67
|
-
def
|
58
|
+
def neuter_exception: (untyped e) -> untyped
|
59
|
+
def new_exception: (untyped klass, untyped msg, untyped bt, ?bool kill) -> untyped
|
68
60
|
attr_accessor self.io_lock: untyped
|
69
61
|
include Minitest::Assertions
|
70
62
|
include Minitest::Reportable
|
71
63
|
include Minitest::Test::LifecycleHooks
|
72
64
|
include Minitest::Guard
|
73
65
|
extend Minitest::Guard
|
74
|
-
TEARDOWN_METHODS: Array[String]
|
75
66
|
PASSTHROUGH_EXCEPTIONS: Array[singleton(NoMemoryError) | singleton(SignalException) | singleton(SystemExit)]
|
67
|
+
SETUP_METHODS: Array[String]
|
68
|
+
TEARDOWN_METHODS: Array[String]
|
76
69
|
end
|