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.
Files changed (125) hide show
  1. checksums.yaml +4 -4
  2. data/.github/workflows/comments.yml +1 -1
  3. data/.github/workflows/ruby.yml +7 -2
  4. data/CHANGELOG.md +85 -0
  5. data/Gemfile.lock +14 -14
  6. data/README.md +11 -2
  7. data/Rakefile +10 -7
  8. data/Steepfile +7 -7
  9. data/core/basic_object.rbs +7 -7
  10. data/core/binding.rbs +3 -3
  11. data/core/builtin.rbs +171 -5
  12. data/core/constants.rbs +17 -17
  13. data/core/dir.rbs +3 -3
  14. data/core/encoding.rbs +434 -628
  15. data/core/enumerator.rbs +37 -0
  16. data/core/exception.rbs +11 -11
  17. data/core/false_class.rbs +5 -11
  18. data/core/fiber.rbs +3 -3
  19. data/core/file_test.rbs +28 -26
  20. data/core/kernel.rbs +900 -21
  21. data/core/marshal.rbs +24 -14
  22. data/core/match_data.rbs +8 -8
  23. data/core/math.rbs +57 -53
  24. data/core/method.rbs +3 -1
  25. data/core/module.rbs +38 -36
  26. data/core/nil_class.rbs +7 -13
  27. data/core/object.rbs +3 -966
  28. data/core/process.rbs +3 -3
  29. data/core/ractor.rbs +2 -2
  30. data/core/rb_config.rbs +64 -43
  31. data/core/regexp.rbs +3 -3
  32. data/core/signal.rbs +10 -4
  33. data/core/struct.rbs +1 -1
  34. data/core/thread.rbs +7 -7
  35. data/core/thread_group.rbs +9 -9
  36. data/core/true_class.rbs +5 -11
  37. data/core/unbound_method.rbs +56 -7
  38. data/core/warning.rbs +33 -0
  39. data/docs/collection.md +56 -6
  40. data/docs/data_and_struct.md +57 -0
  41. data/docs/stdlib.md +61 -2
  42. data/docs/syntax.md +123 -2
  43. data/ext/rbs_extension/lexer.c +624 -569
  44. data/ext/rbs_extension/lexer.h +1 -0
  45. data/ext/rbs_extension/lexer.re +1 -0
  46. data/ext/rbs_extension/lexstate.c +1 -0
  47. data/ext/rbs_extension/parser.c +6 -0
  48. data/goodcheck.yml +2 -2
  49. data/lib/rbs/annotate/formatter.rb +13 -3
  50. data/lib/rbs/annotate/rdoc_source.rb +10 -1
  51. data/lib/rbs/cli/colored_io.rb +48 -0
  52. data/lib/rbs/cli/diff.rb +80 -0
  53. data/lib/rbs/cli.rb +151 -16
  54. data/lib/rbs/collection/config/lockfile.rb +0 -25
  55. data/lib/rbs/collection/config/lockfile_generator.rb +0 -6
  56. data/lib/rbs/collection/installer.rb +1 -1
  57. data/lib/rbs/collection/sources/git.rb +6 -4
  58. data/lib/rbs/collection/sources/local.rb +7 -5
  59. data/lib/rbs/diff.rb +104 -0
  60. data/lib/rbs/environment.rb +1 -1
  61. data/lib/rbs/method_type.rb +23 -0
  62. data/lib/rbs/prototype/rb.rb +2 -9
  63. data/lib/rbs/prototype/runtime/helpers.rb +59 -0
  64. data/lib/rbs/prototype/runtime/value_object_generator.rb +236 -0
  65. data/lib/rbs/prototype/runtime.rb +234 -150
  66. data/lib/rbs/sorter.rb +144 -117
  67. data/lib/rbs/test/guaranteed.rb +31 -0
  68. data/lib/rbs/test/type_check.rb +4 -4
  69. data/lib/rbs/test.rb +3 -0
  70. data/lib/rbs/types.rb +184 -3
  71. data/lib/rbs/version.rb +1 -1
  72. data/lib/rbs/writer.rb +4 -4
  73. data/lib/rbs.rb +1 -0
  74. data/rbs.gemspec +1 -0
  75. data/sig/annotate/formatter.rbs +2 -2
  76. data/sig/annotate/rdoc_annotater.rbs +1 -1
  77. data/sig/cli/colored_io.rbs +15 -0
  78. data/sig/cli/diff.rbs +21 -0
  79. data/sig/cli.rbs +2 -0
  80. data/sig/collection/config/lockfile.rbs +0 -6
  81. data/sig/diff.rbs +23 -0
  82. data/sig/errors.rbs +1 -5
  83. data/sig/method_types.rbs +6 -0
  84. data/sig/prototype/runtime.rbs +108 -0
  85. data/sig/rdoc/rbs.rbs +4 -0
  86. data/sig/shims/bundler.rbs +5 -0
  87. data/sig/sorter.rbs +23 -5
  88. data/sig/types.rbs +29 -0
  89. data/stdlib/benchmark/0/benchmark.rbs +1 -1
  90. data/stdlib/cgi/0/core.rbs +2 -2
  91. data/stdlib/did_you_mean/0/did_you_mean.rbs +2 -2
  92. data/stdlib/digest/0/digest.rbs +1 -1
  93. data/stdlib/fileutils/0/fileutils.rbs +1 -1
  94. data/stdlib/forwardable/0/forwardable.rbs +4 -4
  95. data/stdlib/io-console/0/io-console.rbs +1 -1
  96. data/stdlib/json/0/json.rbs +37 -0
  97. data/stdlib/logger/0/logger.rbs +2 -2
  98. data/stdlib/net-http/0/manifest.yaml +1 -1
  99. data/stdlib/net-http/0/net-http.rbs +16 -63
  100. data/stdlib/net-protocol/0/manifest.yaml +2 -0
  101. data/stdlib/net-protocol/0/net-protocol.rbs +56 -0
  102. data/stdlib/openssl/0/openssl.rbs +1 -1
  103. data/stdlib/pp/0/manifest.yaml +2 -0
  104. data/stdlib/pp/0/pp.rbs +301 -0
  105. data/stdlib/{yaml → psych}/0/dbm.rbs +3 -3
  106. data/stdlib/psych/0/manifest.yaml +3 -0
  107. data/stdlib/psych/0/psych.rbs +391 -0
  108. data/stdlib/{yaml → psych}/0/store.rbs +2 -2
  109. data/stdlib/rdoc/0/code_object.rbs +55 -0
  110. data/stdlib/rdoc/0/comment.rbs +60 -0
  111. data/stdlib/rdoc/0/context.rbs +153 -0
  112. data/stdlib/rdoc/0/markup.rbs +119 -0
  113. data/stdlib/rdoc/0/parser.rbs +56 -0
  114. data/stdlib/rdoc/0/rdoc.rbs +0 -372
  115. data/stdlib/rdoc/0/ri.rbs +17 -0
  116. data/stdlib/rdoc/0/store.rbs +48 -0
  117. data/stdlib/rdoc/0/top_level.rbs +97 -0
  118. data/stdlib/socket/0/basic_socket.rbs +1 -1
  119. data/stdlib/socket/0/socket.rbs +1 -1
  120. data/stdlib/uri/0/common.rbs +1 -1
  121. data/stdlib/yaml/0/manifest.yaml +1 -2
  122. data/stdlib/yaml/0/yaml.rbs +1 -199
  123. metadata +46 -9
  124. data/sig/shims/pp.rbs +0 -3
  125. data/sig/shims.rbs +0 -47
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: e35554c5e6cea0f61928bfdc6faaf896414118057a8889c82dd1d6dc87811811
4
- data.tar.gz: f6506b40efbcc5df5ffeb51ebd700e63311b76aaf6c9627e542aecf8d16232b8
3
+ metadata.gz: 0ce19044f9943d12d17256e09e0296aca13a4284b9e2f76de3b130c002ed9244
4
+ data.tar.gz: d3b2b843cf28aeb5ef4608356aa0eb2d958d4392f541fe91e5e00e7f68a40fc4
5
5
  SHA512:
6
- metadata.gz: b075058eceed815b0fb39a844dc663bda7651694a79a024a33196a252e58eb6767cdc14595fbf989d02f8558ac4b252d543e8e13bfd930abd046e259d12e97a3
7
- data.tar.gz: 7a19f068dc2278bc2bd0332559ecf91c848516f80537ff7bb3bda7cf6084e4c085fbae8f59e7dae241ae16867827e13e81107d154d78c7336cc560eda9084dbb
6
+ metadata.gz: 02e143cf64af949a560f3b41b9d1a1756375ae0456182a3b727b985db88d5f5fe092887d21c3237036ddf177f19661ef80f03c6daa96fdd6840e727d579f1018
7
+ data.tar.gz: 38df75f2912926a63b6082a4515b063e8f4c71d9e3c820adb0b2ee6e7030464fa3702faad28b04b221facb31c79c5aff0f96b7f4d2624b1b399378fc5bcd6168
@@ -13,7 +13,7 @@ jobs:
13
13
  container:
14
14
  image: rubylang/ruby:3.2-dev-focal
15
15
  steps:
16
- - uses: actions/checkout@v3
16
+ - uses: actions/checkout@v4
17
17
  - name: Install dependencies
18
18
  run: |
19
19
  apt-get update
@@ -11,6 +11,7 @@ jobs:
11
11
  test:
12
12
  runs-on: "ubuntu-latest"
13
13
  strategy:
14
+ fail-fast: false
14
15
  matrix:
15
16
  container_tag:
16
17
  - master-nightly-focal
@@ -30,10 +31,13 @@ jobs:
30
31
  job: stdlib_test
31
32
  - container_tag: 3.1-dev-focal
32
33
  job: stdlib_test
34
+ include:
35
+ - container_tag: master-nightly-focal
36
+ allow_failures: "true"
33
37
  container:
34
38
  image: rubylang/ruby:${{ matrix.container_tag }}
35
39
  steps:
36
- - uses: actions/checkout@v3
40
+ - uses: actions/checkout@v4
37
41
  - name: Set working directory as safe
38
42
  run: git config --global --add safe.directory $(pwd)
39
43
  - name: Install dependencies
@@ -66,6 +70,7 @@ jobs:
66
70
  - name: Run test
67
71
  run: |
68
72
  bundle exec rake ${{ matrix.job }}
73
+ continue-on-error: ${{ matrix.allow_failures == 'true' && (github.event_name == 'push' || github.event_name == 'merge_group') }}
69
74
 
70
75
  windows:
71
76
  runs-on: ${{ matrix.os }}
@@ -75,7 +80,7 @@ jobs:
75
80
  os: [windows-2019, windows-2022]
76
81
  ruby: [ucrt, mswin]
77
82
  steps:
78
- - uses: actions/checkout@v3
83
+ - uses: actions/checkout@v4
79
84
  - name: load ruby
80
85
  uses: ruby/setup-ruby@v1
81
86
  with:
data/CHANGELOG.md CHANGED
@@ -2,6 +2,91 @@
2
2
 
3
3
  ## master
4
4
 
5
+ ## 3.3.0.pre.1 (2023-10-31)
6
+
7
+ ### Signature updates
8
+
9
+ * json ([#1575](https://github.com/ruby/rbs/pull/1575))
10
+ * net-protocol ([#1559](https://github.com/ruby/rbs/pull/1559))
11
+ * pp ([#1545](https://github.com/ruby/rbs/pull/1545))
12
+ * psych ([#1527](https://github.com/ruby/rbs/pull/1527))
13
+ * `BasicObject` ([#1506](https://github.com/ruby/rbs/pull/1506))
14
+ * `ConditionVariable` ([#1468](https://github.com/ruby/rbs/pull/1468))
15
+ * `Encoding` ([#1510](https://github.com/ruby/rbs/pull/1510))
16
+ * `Exception` ([#1529](https://github.com/ruby/rbs/pull/1529))
17
+ * `FalseClass` ([#1478](https://github.com/ruby/rbs/pull/1478), [#1487](https://github.com/ruby/rbs/pull/1487))
18
+ * `Fiber` ([#1463](https://github.com/ruby/rbs/pull/1463))
19
+ * `FileTest` ([#1500](https://github.com/ruby/rbs/pull/1500))
20
+ * `Kernel` ([#1567](https://github.com/ruby/rbs/pull/1567), [#1518](https://github.com/ruby/rbs/pull/1518), [#1504](https://github.com/ruby/rbs/pull/1504), [#1487](https://github.com/ruby/rbs/pull/1487))
21
+ * `Marshal` ([#1524](https://github.com/ruby/rbs/pull/1524))
22
+ * `Math` ([#1533](https://github.com/ruby/rbs/pull/1533))
23
+ * `Mutex` ([#1468](https://github.com/ruby/rbs/pull/1468))
24
+ * `NilClass` ([#1478](https://github.com/ruby/rbs/pull/1478), [#1487](https://github.com/ruby/rbs/pull/1487))
25
+ * `Object` ([#1504](https://github.com/ruby/rbs/pull/1504))
26
+ * `Queue` ([#1468](https://github.com/ruby/rbs/pull/1468))
27
+ * `RbConfig` ([#1534](https://github.com/ruby/rbs/pull/1534))
28
+ * `Signal` ([#1512](https://github.com/ruby/rbs/pull/1512))
29
+ * `SizedQueue` ([#1468](https://github.com/ruby/rbs/pull/1468))
30
+ * `ThreadGroup` ([#1509](https://github.com/ruby/rbs/pull/1509))
31
+ * `TrueClass` ([#1478](https://github.com/ruby/rbs/pull/1478), [#1487](https://github.com/ruby/rbs/pull/1487))
32
+ * `Warning` ([#1477](https://github.com/ruby/rbs/pull/1477))
33
+ * `Enumerator.produce` ([#1516](https://github.com/ruby/rbs/pull/1516))
34
+ * `Module.define_method` ([#1557](https://github.com/ruby/rbs/pull/1557))
35
+ * `URI.join` ([#1580](https://github.com/ruby/rbs/pull/1580))
36
+ * `YAML.unsafe_load` ([#1528](https://github.com/ruby/rbs/pull/1528))
37
+ * `builtin.rbs`([#1455](https://github.com/ruby/rbs/pull/1455), [#1469](https://github.com/ruby/rbs/pull/1469))
38
+ * `constants.rbs` ([#1531](https://github.com/ruby/rbs/pull/1531))
39
+ * `::interned` ([#1499](https://github.com/ruby/rbs/pull/1499), [#1488](https://github.com/ruby/rbs/pull/1488))
40
+
41
+
42
+ ### Language updates
43
+
44
+ * Add `__todo__` type ([#1520](https://github.com/ruby/rbs/pull/1520))
45
+
46
+ ### Library changes
47
+
48
+ * Colored diff ([#1589](https://github.com/ruby/rbs/pull/1589))
49
+ * Fix the issue where ::array[T] would be interpreted as ::array, and type mismatch ([#1491](https://github.com/ruby/rbs/pull/1491))
50
+ * Add `Abbrev` to runtime dependency ([#1573](https://github.com/ruby/rbs/pull/1573))
51
+ * Avoid an error when parsing files including SyntaxError ([#1574](https://github.com/ruby/rbs/pull/1574))
52
+ * Implement rbs diff command ([#1459](https://github.com/ruby/rbs/pull/1459))
53
+ * Add another type syntax validation ([#1566](https://github.com/ruby/rbs/pull/1566))* Mark global variables ([#1551](https://github.com/ruby/rbs/pull/1551))
54
+ * Show location of type by method command ([#1537](https://github.com/ruby/rbs/pull/1537))* Make alias and interface names absolute ([#1502](https://github.com/ruby/rbs/pull/1502))
55
+ * Better record type format ([#1501](https://github.com/ruby/rbs/pull/1501))
56
+ * Should keep escape of alias and attr family ([#1486](https://github.com/ruby/rbs/pull/1486))
57
+ * Fix error when undefined interface or alias ([#1465](https://github.com/ruby/rbs/pull/1465))
58
+
59
+ #### rbs prototype
60
+
61
+ * [prototype runtime --todo] Consider accessibility mismatch ([#1539](https://github.com/ruby/rbs/pull/1539))
62
+ * Better support for inherited class of `Struct` or `Data` by prototype runtime ([#1571](https://github.com/ruby/rbs/pull/1571))
63
+ * prototype rb: Ignore ITER (method call with block) ([#1562](https://github.com/ruby/rbs/pull/1562))
64
+ * [prototype runtime] Add --autoload option ([#1561](https://github.com/ruby/rbs/pull/1561))
65
+ * Implement todo option ([#1470](https://github.com/ruby/rbs/pull/1470))
66
+ * [prototype runtime] Fix error when constant is a BasicObject instance. ([#1485](https://github.com/ruby/rbs/pull/1485))
67
+ * [prototype runtime] Const name should be absolute ([#1490](https://github.com/ruby/rbs/pull/1490))
68
+ * [prototype runtime] Optimize performance ([#1495](https://github.com/ruby/rbs/pull/1495))
69
+ * [prototype runtime] Fix error when output Object constants ([#1472](https://github.com/ruby/rbs/pull/1472))
70
+ * [prototype runtime] Support prepend mixin ([#1460](https://github.com/ruby/rbs/pull/1460))
71
+ * [prototype runtime] Avoid alias for methods defined in another module ([#1457](https://github.com/ruby/rbs/pull/1457))
72
+
73
+ #### rbs collection
74
+
75
+ * [Collection] Simple colorize collection text like Bundler ([#1558](https://github.com/ruby/rbs/pull/1558))
76
+ * Delete `sources` section from lockfile ([#1544](https://github.com/ruby/rbs/pull/1544))
77
+
78
+ ### Miscellaneous
79
+
80
+ * Add in with_XXX methods ([#1492](https://github.com/ruby/rbs/pull/1492))
81
+ * Updated binding to use modern kernel tests ([#1507](https://github.com/ruby/rbs/pull/1507))
82
+ * Remove all non-required methods from testing types ([#1541](https://github.com/ruby/rbs/pull/1541))
83
+ * Add `assert_type` assertion to confirm if the value has a type ([#1532](https://github.com/ruby/rbs/pull/1532))
84
+ * Add `#assert_const_type` and guide to use type assertions ([#1514](https://github.com/ruby/rbs/pull/1514))
85
+ * Improve skip test message ([#1476](https://github.com/ruby/rbs/pull/1476))
86
+ * Type check ([#1467](https://github.com/ruby/rbs/pull/1467))
87
+ * Type check RDoc related Ruby code ([#1466](https://github.com/ruby/rbs/pull/1466))
88
+ * Fix CI failure ([#1464](https://github.com/ruby/rbs/pull/1464))
89
+
5
90
  ## 3.2.2 (2023-09-28)
6
91
 
7
92
  ### Library changes
data/Gemfile.lock CHANGED
@@ -1,7 +1,8 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- rbs (3.2.2)
4
+ rbs (3.3.0.pre.1)
5
+ abbrev
5
6
 
6
7
  PATH
7
8
  remote: test/assets/test-gem
@@ -11,10 +12,10 @@ PATH
11
12
  GEM
12
13
  remote: https://rubygems.org/
13
14
  specs:
14
- addressable (2.8.4)
15
+ abbrev (0.1.1)
16
+ addressable (2.8.5)
15
17
  public_suffix (>= 2.0.2, < 6.0)
16
18
  ast (2.4.2)
17
- base64 (0.1.1)
18
19
  dbm (1.1.0)
19
20
  diff-lcs (1.5.0)
20
21
  digest (3.1.1)
@@ -24,27 +25,27 @@ GEM
24
25
  rainbow (>= 3.0, < 4.0)
25
26
  strong_json (>= 1.1, < 2.2)
26
27
  json (2.6.3)
27
- json-schema (4.0.0)
28
+ json-schema (4.1.1)
28
29
  addressable (>= 2.8)
29
30
  language_server-protocol (3.17.0.3)
30
31
  marcel (1.0.2)
31
- minitest (5.19.0)
32
+ minitest (5.20.0)
32
33
  parallel (1.23.0)
33
- parser (3.2.2.3)
34
+ parser (3.2.2.4)
34
35
  ast (~> 2.4.1)
35
36
  racc
36
37
  power_assert (2.0.3)
37
38
  psych (4.0.6)
38
39
  stringio
39
- public_suffix (5.0.1)
40
+ public_suffix (5.0.3)
40
41
  racc (1.7.1)
41
42
  rainbow (3.1.1)
42
- rake (13.0.6)
43
+ rake (13.1.0)
43
44
  rake-compiler (1.2.5)
44
45
  rake
45
46
  rdoc (6.4.0)
46
47
  psych (>= 4.0.0)
47
- regexp_parser (2.8.1)
48
+ regexp_parser (2.8.2)
48
49
  rexml (3.2.6)
49
50
  rspec (3.12.0)
50
51
  rspec-core (~> 3.12.0)
@@ -59,19 +60,18 @@ GEM
59
60
  diff-lcs (>= 1.2.0, < 2.0)
60
61
  rspec-support (~> 3.12.0)
61
62
  rspec-support (3.12.0)
62
- rubocop (1.56.0)
63
- base64 (~> 0.1.1)
63
+ rubocop (1.57.2)
64
64
  json (~> 2.3)
65
65
  language_server-protocol (>= 3.17.0)
66
66
  parallel (~> 1.10)
67
- parser (>= 3.2.2.3)
67
+ parser (>= 3.2.2.4)
68
68
  rainbow (>= 2.2.2, < 4.0)
69
69
  regexp_parser (>= 1.8, < 3.0)
70
70
  rexml (>= 3.2.5, < 4.0)
71
71
  rubocop-ast (>= 1.28.1, < 2.0)
72
72
  ruby-progressbar (~> 1.7)
73
73
  unicode-display_width (>= 2.4.0, < 3.0)
74
- rubocop-ast (1.29.0)
74
+ rubocop-ast (1.30.0)
75
75
  parser (>= 3.2.1.0)
76
76
  rubocop-rubycw (0.1.6)
77
77
  rubocop (~> 1.0)
@@ -82,7 +82,7 @@ GEM
82
82
  tempfile (0.1.3)
83
83
  test-unit (3.6.1)
84
84
  power_assert
85
- unicode-display_width (2.4.2)
85
+ unicode-display_width (2.5.0)
86
86
 
87
87
  PLATFORMS
88
88
  ruby
data/README.md CHANGED
@@ -54,8 +54,8 @@ end
54
54
 
55
55
  ## The Target Version
56
56
 
57
- * The standard library signatures targets Ruby 3.1. (The latest release of Ruby.)
58
- * The library code targets Ruby 3.1, 3.0, and 2.7. (It runs on 2.6 in fact.)
57
+ * The standard library signatures targets the latest release of Ruby. (`3.2` as of 2023.)
58
+ * The library code targets non-EOL versions of Ruby. (`>= 3.0` as of 2023.)
59
59
 
60
60
  ## Installation
61
61
 
@@ -132,6 +132,15 @@ puts singleton.methods[:gsub]
132
132
  - [Stdlib signatures guide](docs/stdlib.md)
133
133
  - [Syntax](docs/syntax.md)
134
134
  - [RBS by Example](docs/rbs_by_example.md)
135
+ - [RBS collection](docs/collection.md)
136
+ - [Using `Data` and `Struct`](docs/data_and_struct.md)
137
+
138
+ ## Community
139
+
140
+ Here is a list of some places you can talk with active maintainers.
141
+
142
+ - [Ruby Discord Server (invite link)](https://discord.gg/ad2acQFtkh) -- We have `rbs` channel in Ruby Discord server.
143
+ - [ruby-jp Slack Workspace (in Japanese)](https://ruby-jp.github.io/) -- We have `types` channel in ruby-jp slack workspace.
135
144
 
136
145
  ## Development
137
146
 
data/Rakefile CHANGED
@@ -84,11 +84,12 @@ end
84
84
 
85
85
  task :stdlib_test => :compile do
86
86
  test_files = FileList["test/stdlib/**/*_test.rb"].reject do |path|
87
- path =~ %r{Ractor}
87
+ path =~ %r{Ractor} || path =~ %r{Encoding}
88
88
  end
89
89
  sh "#{ruby} -Ilib #{bin}/test_runner.rb #{test_files.join(' ')}"
90
90
  # TODO: Ractor tests need to be run in a separate process
91
91
  sh "#{ruby} -Ilib #{bin}/test_runner.rb test/stdlib/Ractor_test.rb"
92
+ sh "#{ruby} -Ilib #{bin}/test_runner.rb test/stdlib/Encoding_test.rb"
92
93
  end
93
94
 
94
95
  task :rubocop do
@@ -157,13 +158,14 @@ namespace :generate do
157
158
  # library "pathname", "securerandom" # Declare library signatures to load
158
159
  testing "singleton(::<%= target %>)"
159
160
 
160
- <%- class_methods.each do |method_name, definition| %>
161
+ <%- class_methods.each do |method_name, definition| -%>
161
162
  def test_<%= test_name_for(method_name) %>
162
163
  <%- definition.method_types.each do |method_type| -%>
163
- assert_send_type "<%= method_type %>",
164
- <%= target %>, :<%= method_name %>
164
+ assert_send_type "<%= method_type %>",
165
+ <%= target %>, :<%= method_name %>
165
166
  <%- end -%>
166
167
  end
168
+
167
169
  <%- end -%>
168
170
  end
169
171
  <%- end -%>
@@ -175,13 +177,14 @@ namespace :generate do
175
177
  # library "pathname", "securerandom" # Declare library signatures to load
176
178
  testing "::<%= target %>"
177
179
 
178
- <%- instance_methods.each do |method_name, definition| %>
180
+ <%- instance_methods.each do |method_name, definition| -%>
179
181
  def test_<%= test_name_for(method_name) %>
180
182
  <%- definition.method_types.each do |method_type| -%>
181
- assert_send_type "<%= method_type %>",
182
- <%= target %>.new, :<%= method_name %>
183
+ assert_send_type "<%= method_type %>",
184
+ <%= target %>.new, :<%= method_name %>
183
185
  <%- end -%>
184
186
  end
187
+
185
188
  <%- end -%>
186
189
  end
187
190
  <%- end -%>
data/Steepfile CHANGED
@@ -4,23 +4,23 @@ target :lib do
4
4
  signature "sig"
5
5
  check "lib"
6
6
  ignore(
7
- "lib/rbs/prototype/runtime.rb",
8
7
  "lib/rbs/test",
9
8
  "lib/rbs/test.rb"
10
9
  )
11
10
 
12
- library "pathname", "json", "logger", "monitor", "tsort", "uri", 'dbm', 'pstore', 'singleton', 'shellwords', 'fileutils', 'find', 'digest', 'abbrev'
11
+ library "pathname", "json", "logger", "monitor", "tsort", "uri", 'dbm', 'pstore', 'singleton', 'shellwords', 'fileutils', 'find', 'digest', 'abbrev', 'prettyprint'
13
12
  signature 'stdlib/yaml/0'
14
13
  signature "stdlib/strscan/0/"
15
14
  signature "stdlib/optparse/0/"
16
15
  signature "stdlib/rdoc/0/"
17
16
  signature "stdlib/ripper/0"
17
+ signature "stdlib/pp/0"
18
18
 
19
- configure_code_diagnostics do |config|
20
- config[D::Ruby::MethodDefinitionMissing] = :hint
21
- config[D::Ruby::ElseOnExhaustiveCase] = :hint
22
- config[D::Ruby::FallbackAny] = :hint
23
- end
19
+ # configure_code_diagnostics do |config|
20
+ # config[D::Ruby::MethodDefinitionMissing] = :hint
21
+ # config[D::Ruby::ElseOnExhaustiveCase] = :hint
22
+ # config[D::Ruby::FallbackAny] = :hint
23
+ # end
24
24
  end
25
25
 
26
26
  # target :lib do
@@ -163,7 +163,7 @@ class BasicObject
163
163
  # k = Klass.new
164
164
  # k.send :hello, "gentle", "readers" #=> "Hello gentle readers"
165
165
  #
166
- def __send__: (String | Symbol arg0, *untyped args) -> untyped
166
+ def __send__: (interned name, *untyped, **untyped) ?{ (*untyped, **untyped) -> untyped } -> untyped
167
167
 
168
168
  # <!-- rdoc-file=object.c -->
169
169
  # Equality --- At the Object level, #== returns `true` only if `obj` and `other`
@@ -195,7 +195,7 @@ class BasicObject
195
195
  # 1 == 1.0 #=> true
196
196
  # 1.eql? 1.0 #=> false
197
197
  #
198
- def equal?: (untyped other) -> bool
198
+ alias equal? ==
199
199
 
200
200
  # <!--
201
201
  # rdoc-file=vm_eval.c
@@ -228,7 +228,7 @@ class BasicObject
228
228
  # k.instance_eval { the_secret } #=> "Ssssh! The secret is 99."
229
229
  # k.instance_eval {|obj| obj == self } #=> true
230
230
  #
231
- def instance_eval: (String, ?String filename, ?Integer lineno) -> untyped
231
+ def instance_eval: (string code, ?string filename, ?int lineno) -> untyped
232
232
  | [U] () { (self) [self: self] -> U } -> U
233
233
 
234
234
  # <!--
@@ -256,7 +256,7 @@ class BasicObject
256
256
  # -->
257
257
  # Returns a new BasicObject.
258
258
  #
259
- def initialize: () -> void
259
+ def initialize: () -> nil
260
260
 
261
261
  private
262
262
 
@@ -318,7 +318,7 @@ class BasicObject
318
318
  # Adding one
319
319
  # Adding three
320
320
  #
321
- def singleton_method_added: (Symbol) -> void
321
+ def singleton_method_added: (Symbol name) -> nil
322
322
 
323
323
  # <!--
324
324
  # rdoc-file=object.c
@@ -345,7 +345,7 @@ class BasicObject
345
345
  # Removing three
346
346
  # Removing one
347
347
  #
348
- def singleton_method_removed: (Symbol) -> void
348
+ def singleton_method_removed: (Symbol name) -> nil
349
349
 
350
350
  # <!--
351
351
  # rdoc-file=object.c
@@ -368,5 +368,5 @@ class BasicObject
368
368
  #
369
369
  # Undefining one
370
370
  #
371
- def singleton_method_undefined: (Symbol) -> void
371
+ def singleton_method_undefined: (Symbol name) -> nil
372
372
  end
data/core/binding.rbs CHANGED
@@ -66,7 +66,7 @@ class Binding
66
66
  #
67
67
  # binding.eval("defined?(#{symbol}) == 'local-variable'")
68
68
  #
69
- def local_variable_defined?: (Symbol | string varname) -> bool
69
+ def local_variable_defined?: (interned varname) -> bool
70
70
 
71
71
  # <!--
72
72
  # rdoc-file=proc.c
@@ -84,7 +84,7 @@ class Binding
84
84
  #
85
85
  # binding.eval("#{symbol}")
86
86
  #
87
- def local_variable_get: (Symbol | string varname) -> untyped
87
+ def local_variable_get: (interned varname) -> untyped
88
88
 
89
89
  # <!--
90
90
  # rdoc-file=proc.c
@@ -111,7 +111,7 @@ class Binding
111
111
  #
112
112
  # if `obj` can be dumped in Ruby code.
113
113
  #
114
- def local_variable_set: [U] (Symbol | string varname, U obj) -> U
114
+ def local_variable_set: [U] (interned varname, U obj) -> U
115
115
 
116
116
  # <!--
117
117
  # rdoc-file=proc.c