rbs 3.7.0.dev.1 → 3.7.0

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.
Files changed (83) hide show
  1. checksums.yaml +4 -4
  2. data/.github/workflows/ruby.yml +1 -1
  3. data/.github/workflows/windows.yml +5 -3
  4. data/.gitignore +1 -0
  5. data/.rubocop.yml +6 -0
  6. data/CHANGELOG.md +53 -0
  7. data/Rakefile +23 -0
  8. data/config.yml +311 -0
  9. data/core/dir.rbs +1 -1
  10. data/core/kernel.rbs +2 -2
  11. data/core/process.rbs +1 -1
  12. data/core/set.rbs +1 -1
  13. data/docs/syntax.md +6 -4
  14. data/ext/rbs_extension/extconf.rb +10 -0
  15. data/ext/rbs_extension/parser.c +103 -110
  16. data/ext/rbs_extension/rbs_extension.h +1 -2
  17. data/{ext/rbs_extension → include/rbs}/constants.h +21 -19
  18. data/include/rbs/ruby_objs.h +72 -0
  19. data/include/rbs.h +7 -0
  20. data/lib/rbs/collection/config/lockfile_generator.rb +34 -5
  21. data/lib/rbs/collection/config.rb +2 -2
  22. data/lib/rbs/environment_loader.rb +5 -0
  23. data/lib/rbs/prototype/rb.rb +7 -3
  24. data/lib/rbs/types.rb +10 -3
  25. data/lib/rbs/version.rb +1 -1
  26. data/sig/ancestor_graph.rbs +1 -1
  27. data/sig/collection/config/lockfile_generator.rbs +9 -1
  28. data/sig/definition.rbs +1 -1
  29. data/sig/definition_builder.rbs +1 -1
  30. data/sig/environment.rbs +1 -1
  31. data/sig/prototype/rb.rbs +1 -1
  32. data/sig/type_alias_dependency.rbs +2 -2
  33. data/sig/type_alias_regularity.rbs +1 -1
  34. data/sig/type_param.rbs +3 -3
  35. data/sig/vendorer.rbs +1 -1
  36. data/{ext/rbs_extension → src}/constants.c +35 -36
  37. data/src/ruby_objs.c +793 -0
  38. data/stdlib/cgi/0/manifest.yaml +1 -0
  39. data/stdlib/csv/0/manifest.yaml +1 -0
  40. data/stdlib/did_you_mean/0/did_you_mean.rbs +1 -1
  41. data/stdlib/json/0/json.rbs +1 -1
  42. data/stdlib/minitest/0/kernel.rbs +2 -2
  43. data/stdlib/minitest/0/minitest/abstract_reporter.rbs +4 -1
  44. data/stdlib/minitest/0/minitest/assertion.rbs +1 -0
  45. data/stdlib/minitest/0/minitest/assertions.rbs +58 -13
  46. data/stdlib/minitest/0/minitest/backtrace_filter.rbs +7 -0
  47. data/stdlib/minitest/0/minitest/bench_spec.rbs +8 -8
  48. data/stdlib/minitest/0/minitest/benchmark.rbs +17 -16
  49. data/stdlib/minitest/0/minitest/compress.rbs +13 -0
  50. data/stdlib/minitest/0/minitest/error_on_warning.rbs +3 -0
  51. data/stdlib/minitest/0/minitest/mock.rbs +9 -5
  52. data/stdlib/minitest/0/minitest/parallel/executor.rbs +4 -0
  53. data/stdlib/minitest/0/minitest/parallel/test/class_methods.rbs +0 -1
  54. data/stdlib/minitest/0/minitest/pride_io.rbs +8 -0
  55. data/stdlib/minitest/0/minitest/pride_lol.rbs +2 -0
  56. data/stdlib/minitest/0/minitest/progress_reporter.rbs +1 -1
  57. data/stdlib/minitest/0/minitest/reportable.rbs +2 -0
  58. data/stdlib/minitest/0/minitest/runnable.rbs +33 -1
  59. data/stdlib/minitest/0/minitest/spec/dsl/instance_methods.rbs +1 -1
  60. data/stdlib/minitest/0/minitest/spec/dsl.rbs +10 -6
  61. data/stdlib/minitest/0/minitest/spec.rbs +1 -1
  62. data/stdlib/minitest/0/minitest/statistics_reporter.rbs +5 -0
  63. data/stdlib/minitest/0/minitest/summary_reporter.rbs +0 -7
  64. data/stdlib/minitest/0/minitest/test/lifecycle_hooks.rbs +1 -1
  65. data/stdlib/minitest/0/minitest/test.rbs +7 -14
  66. data/stdlib/minitest/0/minitest/unexpected_error.rbs +2 -0
  67. data/stdlib/minitest/0/minitest/unexpected_warning.rbs +6 -0
  68. data/stdlib/minitest/0/minitest/unit.rbs +1 -2
  69. data/stdlib/minitest/0/minitest.rbs +41 -892
  70. data/stdlib/open-uri/0/manifest.yaml +1 -0
  71. data/stdlib/openssl/0/manifest.yaml +1 -0
  72. data/stdlib/openssl/0/openssl.rbs +26 -1
  73. data/stdlib/psych/0/core_ext.rbs +12 -0
  74. data/templates/include/rbs/constants.h.erb +20 -0
  75. data/templates/include/rbs/ruby_objs.h.erb +10 -0
  76. data/templates/src/constants.c.erb +36 -0
  77. data/templates/src/ruby_objs.c.erb +27 -0
  78. data/templates/template.rb +122 -0
  79. metadata +19 -9
  80. data/ext/rbs_extension/ruby_objs.c +0 -602
  81. data/ext/rbs_extension/ruby_objs.h +0 -51
  82. data/stdlib/minitest/0/manifest.yaml +0 -2
  83. /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) ?{ () -> untyped } -> untyped
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) ?{ () -> untyped } -> untyped
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) ?{ () -> untyped } -> untyped
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: () ?{ () -> untyped } -> untyped
102
+ def subject: () { (?) -> untyped } -> untyped
99
103
 
100
104
  def create: (untyped name, untyped desc) -> untyped
101
105
 
@@ -6,6 +6,6 @@
6
6
  class Minitest::Spec < ::Minitest::Test
7
7
  def self.current: () -> untyped
8
8
  def initialize: (untyped name) -> void
9
- include Minitest::Spec::DSL::InstanceMethods
10
9
  extend Minitest::Spec::DSL
10
+ include Minitest::Spec::DSL::InstanceMethods
11
11
  end
@@ -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
@@ -35,7 +35,7 @@ module Minitest::Test::LifecycleHooks
35
35
  # end
36
36
  # end
37
37
  #
38
- # class MiniTest::Test
38
+ # class Minitest::Test
39
39
  # include MyMinitestPlugin
40
40
  # end
41
41
  #
@@ -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 when you want to run your tests in
35
- # parallel. In doing so, you're admitting that you rule and your tests are
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 with_info_handler: () ?{ () -> untyped } -> untyped
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
@@ -7,4 +7,6 @@ class Minitest::UnexpectedError < ::Minitest::Assertion
7
7
  def message: () -> ::String
8
8
  def result_label: () -> "Error"
9
9
  attr_accessor error: untyped
10
+ include Minitest::Compress
11
+ BASE_RE: Regexp
10
12
  end
@@ -0,0 +1,6 @@
1
+ # <!-- rdoc-file=lib/minitest.rb -->
2
+ # Assertion raised on warning when running in -Werror mode.
3
+ #
4
+ class Minitest::UnexpectedWarning < ::Minitest::Assertion
5
+ def result_label: () -> "Warning"
6
+ end
@@ -1,5 +1,4 @@
1
1
  class Minitest::Unit
2
2
  def self.autorun: () -> untyped
3
- def self.after_tests: () ?{ () -> untyped } -> untyped
4
- VERSION: String
3
+ def self.after_tests: () { (?) -> untyped } -> untyped
5
4
  end