rbs 3.0.0.dev.2 → 3.0.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 (113) hide show
  1. checksums.yaml +4 -4
  2. data/.github/workflows/comments.yml +2 -1
  3. data/.github/workflows/ruby.yml +4 -0
  4. data/CHANGELOG.md +67 -0
  5. data/Gemfile.lock +11 -11
  6. data/Rakefile +2 -2
  7. data/Steepfile +1 -0
  8. data/core/array.rbs +573 -423
  9. data/core/basic_object.rbs +11 -39
  10. data/core/binding.rbs +1 -1
  11. data/core/builtin.rbs +8 -0
  12. data/core/class.rbs +37 -0
  13. data/core/comparable.rbs +7 -18
  14. data/core/complex.rbs +2 -2
  15. data/core/data.rbs +419 -0
  16. data/core/dir.rbs +52 -104
  17. data/core/encoding.rbs +22 -181
  18. data/core/enumerable.rbs +212 -175
  19. data/core/enumerator/product.rbs +94 -0
  20. data/core/enumerator.rbs +57 -8
  21. data/core/errors.rbs +8 -2
  22. data/core/exception.rbs +41 -0
  23. data/core/fiber.rbs +95 -12
  24. data/core/file.rbs +840 -275
  25. data/core/file_test.rbs +34 -19
  26. data/core/float.rbs +40 -96
  27. data/core/gc.rbs +15 -3
  28. data/core/hash.rbs +113 -175
  29. data/core/integer.rbs +85 -145
  30. data/core/io/buffer.rbs +187 -60
  31. data/core/io/wait.rbs +28 -16
  32. data/core/io.rbs +1859 -1389
  33. data/core/kernel.rbs +525 -961
  34. data/core/match_data.rbs +306 -142
  35. data/core/math.rbs +506 -234
  36. data/core/method.rbs +0 -24
  37. data/core/module.rbs +110 -17
  38. data/core/nil_class.rbs +2 -0
  39. data/core/numeric.rbs +76 -144
  40. data/core/object.rbs +88 -212
  41. data/core/proc.rbs +17 -5
  42. data/core/process.rbs +22 -5
  43. data/core/ractor.rbs +1 -1
  44. data/core/random.rbs +20 -3
  45. data/core/range.rbs +91 -89
  46. data/core/rational.rbs +2 -3
  47. data/core/rbs/unnamed/argf.rbs +177 -120
  48. data/core/rbs/unnamed/env_class.rbs +89 -163
  49. data/core/rbs/unnamed/random.rbs +36 -12
  50. data/core/refinement.rbs +8 -0
  51. data/core/regexp.rbs +462 -272
  52. data/core/ruby_vm.rbs +210 -0
  53. data/{stdlib/set/0 → core}/set.rbs +43 -47
  54. data/core/string.rbs +1403 -1332
  55. data/core/string_io.rbs +191 -107
  56. data/core/struct.rbs +67 -63
  57. data/core/symbol.rbs +187 -201
  58. data/core/thread.rbs +40 -35
  59. data/core/time.rbs +902 -826
  60. data/core/trace_point.rbs +55 -6
  61. data/core/unbound_method.rbs +48 -24
  62. data/docs/collection.md +4 -0
  63. data/docs/syntax.md +55 -0
  64. data/ext/rbs_extension/parser.c +5 -6
  65. data/lib/rbs/cli.rb +11 -1
  66. data/lib/rbs/collection/cleaner.rb +8 -1
  67. data/lib/rbs/collection/config/lockfile.rb +3 -1
  68. data/lib/rbs/collection/config/lockfile_generator.rb +16 -14
  69. data/lib/rbs/collection/config.rb +1 -1
  70. data/lib/rbs/collection/sources/git.rb +9 -2
  71. data/lib/rbs/collection/sources/local.rb +79 -0
  72. data/lib/rbs/collection/sources.rb +8 -1
  73. data/lib/rbs/environment.rb +11 -27
  74. data/lib/rbs/environment_loader.rb +3 -2
  75. data/lib/rbs/errors.rb +18 -0
  76. data/lib/rbs/locator.rb +26 -7
  77. data/lib/rbs/sorter.rb +2 -2
  78. data/lib/rbs/version.rb +1 -1
  79. data/sig/collection/sources.rbs +32 -3
  80. data/sig/environment.rbs +5 -8
  81. data/sig/locator.rbs +14 -2
  82. data/sig/shims/{abstract_syntax_tree.rbs → _abstract_syntax_tree.rbs} +0 -0
  83. data/stdlib/bigdecimal/0/big_decimal.rbs +16 -13
  84. data/stdlib/cgi/0/core.rbs +16 -0
  85. data/stdlib/coverage/0/coverage.rbs +50 -8
  86. data/stdlib/csv/0/csv.rbs +1 -1
  87. data/stdlib/date/0/date.rbs +856 -726
  88. data/stdlib/date/0/date_time.rbs +83 -210
  89. data/stdlib/erb/0/erb.rbs +13 -36
  90. data/stdlib/etc/0/etc.rbs +127 -20
  91. data/stdlib/fileutils/0/fileutils.rbs +1290 -381
  92. data/stdlib/logger/0/logger.rbs +466 -316
  93. data/stdlib/net-http/0/net-http.rbs +2211 -534
  94. data/stdlib/nkf/0/nkf.rbs +5 -5
  95. data/stdlib/objspace/0/objspace.rbs +31 -14
  96. data/stdlib/openssl/0/openssl.rbs +11 -7
  97. data/stdlib/optparse/0/optparse.rbs +20 -17
  98. data/stdlib/pathname/0/pathname.rbs +21 -4
  99. data/stdlib/pstore/0/pstore.rbs +378 -154
  100. data/stdlib/pty/0/pty.rbs +24 -8
  101. data/stdlib/ripper/0/ripper.rbs +1650 -0
  102. data/stdlib/socket/0/addrinfo.rbs +9 -15
  103. data/stdlib/socket/0/socket.rbs +36 -3
  104. data/stdlib/strscan/0/string_scanner.rbs +7 -5
  105. data/stdlib/tempfile/0/tempfile.rbs +104 -44
  106. data/stdlib/time/0/time.rbs +2 -2
  107. data/stdlib/uri/0/file.rbs +5 -0
  108. data/stdlib/uri/0/generic.rbs +2 -2
  109. data/stdlib/yaml/0/yaml.rbs +2 -2
  110. data/stdlib/zlib/0/zlib.rbs +1 -1
  111. metadata +10 -8
  112. data/core/deprecated.rbs +0 -9
  113. data/sig/shims/ripper.rbs +0 -8
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 37f0e00e909c3e55bf8f8a80187fe4825d325e8b5ffc392d749058dba6d37561
4
- data.tar.gz: 541db099d371d39611212952a07f545be143dd26845532665ee3f7c48fe5e3f7
3
+ metadata.gz: c9546b97619812576e413b751c26e75ad667f97c0540f4b912b4030d851e013f
4
+ data.tar.gz: aff1d7c49fcc8012c6c78567af73ab9373d4ffe19756a8c17abe27c2ae674a3f
5
5
  SHA512:
6
- metadata.gz: 68e344e08d8aa8333dc8a4c4292e8b45ba7eab22027c570dc7c18f5e9f86289914ee742261e423bb5ea2924ccb3cbf9516de67150f86a8dd6aabdf573404c1ed
7
- data.tar.gz: 680e1b9be1495dae9c1842c7e5b49984c819fe2c54fea9002d3508727b60847bc0fbee737ef2625f603e00406f612008f9b515be37cb662ed5dd4ee1b4af736f
6
+ metadata.gz: e35d66d2260a2dd3264174015a51eaab3a735367755d118d7f4140228369c540ed8c0c9d5f196348593a9983b27ae137b27d8d4cce25b355e31ce393d7e75aee
7
+ data.tar.gz: 2a416a42c26427a9415418124f5196215239fe4a5e37092ede2ed61faf8ff74cf208032a592d6fb65d909b9657820c734d85882ee597de7b316d7aa19f609a40
@@ -5,12 +5,13 @@ on:
5
5
  branches:
6
6
  - master
7
7
  pull_request: {}
8
+ merge_group: {}
8
9
 
9
10
  jobs:
10
11
  test:
11
12
  runs-on: "ubuntu-latest"
12
13
  container:
13
- image: rubylang/ruby:3.1-dev-focal
14
+ image: rubylang/ruby:3.2-dev-focal
14
15
  steps:
15
16
  - uses: actions/checkout@v3
16
17
  - name: Install dependencies
@@ -5,6 +5,7 @@ on:
5
5
  branches:
6
6
  - master
7
7
  pull_request: {}
8
+ merge_group: {}
8
9
 
9
10
  jobs:
10
11
  test:
@@ -13,6 +14,7 @@ jobs:
13
14
  matrix:
14
15
  container_tag:
15
16
  - master-nightly-focal
17
+ - 3.2-dev-focal
16
18
  - 3.1-dev-focal
17
19
  - 3.0-dev-focal
18
20
  - 2.7-dev-bionic
@@ -32,6 +34,8 @@ jobs:
32
34
  job: stdlib_test
33
35
  - container_tag: 3.0-dev-focal
34
36
  job: stdlib_test
37
+ - container_tag: 3.1-dev-focal
38
+ job: stdlib_test
35
39
  container:
36
40
  image: rubylang/ruby:${{ matrix.container_tag }}
37
41
  steps:
data/CHANGELOG.md CHANGED
@@ -2,6 +2,73 @@
2
2
 
3
3
  ## master
4
4
 
5
+ ## 3.0.0 (2023-02-22)
6
+
7
+ Read [the release note](https://github.com/ruby/rbs/wiki/Release-Note-3.0) for the overview of the changes.
8
+
9
+ ### Signature updates
10
+
11
+ * Ruby 3.2 core updates ([#1238](https://github.com/ruby/rbs/pull/1238), [#1246](https://github.com/ruby/rbs/pull/1246), [#1242](https://github.com/ruby/rbs/pull/1242))
12
+ * Ruby 3.2 stdlib updates ([#1240](https://github.com/ruby/rbs/pull/1240))
13
+ * Ruby 3.2 incompatibilities ([#1241](https://github.com/ruby/rbs/pull/1241))
14
+ * ripper ([#1193](https://github.com/ruby/rbs/pull/1193))
15
+ * `RubyVM::AbstractSyntaxTree` ([#1189](https://github.com/ruby/rbs/pull/1189))
16
+ * `Array#zip` ([#1232](https://github.com/ruby/rbs/pull/1232))
17
+ * `Enumerable#zip` ([#1232](https://github.com/ruby/rbs/pull/1232))
18
+ * `Module#attr_*` ([#1218](https://github.com/ruby/rbs/pull/1218), [#1229](https://github.com/ruby/rbs/pull/1229))
19
+ * `Regexp.new` ([#1237](https://github.com/ruby/rbs/pull/1237))
20
+ * `Regexp#=~` ([#1195](https://github.com/ruby/rbs/pull/1195))
21
+ * `Socket.new` ([#1185](https://github.com/ruby/rbs/pull/1185))
22
+ * `Object::name` ([#1204](https://github.com/ruby/rbs/pull/1204))
23
+ * `_ToProc#to_proc` ([#1223](https://github.com/ruby/rbs/pull/1223))
24
+ * Add `implicitly-returns-nil` annotations ([#1226](https://github.com/ruby/rbs/pull/1226))
25
+
26
+ ### Language updates
27
+
28
+ #### Class/module alias declaration
29
+
30
+ * Spec: https://hackmd.io/SAE7AGD6SMSJFnYiR2M5-Q?view
31
+ * Pull requests: [#1219](https://github.com/ruby/rbs/pull/1219), [#1220](https://github.com/ruby/rbs/pull/1220)
32
+
33
+ #### `use` directives
34
+
35
+ * Spec: https://hackmd.io/pQehT1u1RfSj6lBcdgW8hg
36
+ * Pull requests: [#1224](https://github.com/ruby/rbs/pull/1224), [#1234](https://github.com/ruby/rbs/pull/1234), [#1235](https://github.com/ruby/rbs/pull/1235)
37
+
38
+ #### Per-overload annotations
39
+
40
+ * Pull requests: [#1174](https://github.com/ruby/rbs/pull/1174)
41
+
42
+ ### Library changes
43
+
44
+ * `Environment` cleanup ([#1209](https://github.com/ruby/rbs/pull/1209), [#1236](https://github.com/ruby/rbs/pull/1236), [#1247](https://github.com/ruby/rbs/pull/1247))
45
+ * Add "Expected one argument." to `rbs ancestors` command ([#1245](https://github.com/ruby/rbs/pull/1245))
46
+ * Implement `#detailed_message` for `ParsingError` ([#1166](https://github.com/ruby/rbs/pull/1166))
47
+ * Support interface in class/module for `Sorter` ([#1191](https://github.com/ruby/rbs/pull/1191))
48
+ * Use `-std=gnu99` instead of `-std=c99` ([#973](https://github.com/ruby/rbs/pull/973))
49
+ * Add `rbs_` prefix to `skip` function ([#1186](https://github.com/ruby/rbs/pull/1186))
50
+ * Better method definition resolution for overload/mixin combination ([#1199](https://github.com/ruby/rbs/pull/1199))
51
+ * Escaping for keywords is no longer necessary ([#1178](https://github.com/ruby/rbs/pull/1178))
52
+ * Fix super-class location ([#1172](https://github.com/ruby/rbs/pull/1172))
53
+
54
+ #### rbs prototype
55
+
56
+ * Introduce new heuristics for block types ([#1180](https://github.com/ruby/rbs/pull/1180))
57
+
58
+ #### rbs collection
59
+
60
+ * Install only *library* dependencies ([#1222](https://github.com/ruby/rbs/pull/1222), [#1228](https://github.com/ruby/rbs/pull/1228))
61
+ * Add *local source* ([#854](https://github.com/ruby/rbs/pull/854))
62
+ * Refactor collection ([#1149](https://github.com/ruby/rbs/pull/1149))
63
+ * Let `#resolved_revision` return the last fetched commit ([#1215](https://github.com/ruby/rbs/pull/1215))
64
+
65
+ ### Miscellaneous
66
+
67
+ * Update `syntax.md` ([#1243](https://github.com/ruby/rbs/pull/1243))
68
+ * Add link to `RBS by Example` to `README.md` [#1225](https://github.com/ruby/rbs/pull/1225)
69
+ * Make `rake stdlib_test` run with single process ([#1207](https://github.com/ruby/rbs/pull/1207), [#1211](https://github.com/ruby/rbs/pull/1211), [#1231](https://github.com/ruby/rbs/pull/1231))
70
+ * Remove `steep/*` files from `.gem` ([#1214](https://github.com/ruby/rbs/pull/1214), [#1216](https://github.com/ruby/rbs/pull/1216))
71
+
5
72
  ## 2.8.4 (2023-01-20)
6
73
 
7
74
  ### Miscellaneous
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- rbs (3.0.0.dev.2)
4
+ rbs (3.0.0)
5
5
 
6
6
  PATH
7
7
  remote: test/assets/test-gem
@@ -17,7 +17,7 @@ GEM
17
17
  dbm (1.1.0)
18
18
  debase (0.2.5.beta2)
19
19
  debase-ruby_core_source (>= 0.10.12)
20
- debase-ruby_core_source (0.10.16)
20
+ debase-ruby_core_source (3.2.0)
21
21
  diff-lcs (1.5.0)
22
22
  digest (3.1.1)
23
23
  forwardable (1.3.2)
@@ -32,7 +32,7 @@ GEM
32
32
  marcel (1.0.2)
33
33
  minitest (5.17.0)
34
34
  parallel (1.22.1)
35
- parser (3.1.3.0)
35
+ parser (3.2.1.0)
36
36
  ast (~> 2.4.1)
37
37
  power_assert (2.0.2)
38
38
  prime (0.1.2)
@@ -47,7 +47,7 @@ GEM
47
47
  rake
48
48
  rdoc (6.4.0)
49
49
  psych (>= 4.0.0)
50
- regexp_parser (2.6.1)
50
+ regexp_parser (2.7.0)
51
51
  rexml (3.2.5)
52
52
  rspec (3.12.0)
53
53
  rspec-core (~> 3.12.0)
@@ -62,18 +62,18 @@ GEM
62
62
  diff-lcs (>= 1.2.0, < 2.0)
63
63
  rspec-support (~> 3.12.0)
64
64
  rspec-support (3.12.0)
65
- rubocop (1.40.0)
65
+ rubocop (1.45.1)
66
66
  json (~> 2.3)
67
67
  parallel (~> 1.10)
68
- parser (>= 3.1.2.1)
68
+ parser (>= 3.2.0.0)
69
69
  rainbow (>= 2.2.2, < 4.0)
70
70
  regexp_parser (>= 1.8, < 3.0)
71
71
  rexml (>= 3.2.5, < 4.0)
72
- rubocop-ast (>= 1.23.0, < 2.0)
72
+ rubocop-ast (>= 1.24.1, < 2.0)
73
73
  ruby-progressbar (~> 1.7)
74
- unicode-display_width (>= 1.4.0, < 3.0)
75
- rubocop-ast (1.24.0)
76
- parser (>= 3.1.1.0)
74
+ unicode-display_width (>= 2.4.0, < 3.0)
75
+ rubocop-ast (1.26.0)
76
+ parser (>= 3.2.1.0)
77
77
  rubocop-rubycw (0.1.6)
78
78
  rubocop (~> 1.0)
79
79
  ruby-debug-ide (0.7.3)
@@ -86,7 +86,7 @@ GEM
86
86
  tempfile (0.1.3)
87
87
  test-unit (3.5.7)
88
88
  power_assert
89
- unicode-display_width (2.3.0)
89
+ unicode-display_width (2.4.2)
90
90
 
91
91
  PLATFORMS
92
92
  ruby
data/Rakefile CHANGED
@@ -143,7 +143,7 @@ namespace :generate do
143
143
  class <%= target %>SingletonTest < Test::Unit::TestCase
144
144
  include TypeAssertions
145
145
 
146
- # library "pathname", "set", "securerandom" # Declare library signatures to load
146
+ # library "pathname", "securerandom" # Declare library signatures to load
147
147
  testing "singleton(::<%= target %>)"
148
148
 
149
149
  <%- class_methods.each do |method_name, definition| %>
@@ -161,7 +161,7 @@ namespace :generate do
161
161
  class <%= target %>Test < Test::Unit::TestCase
162
162
  include TypeAssertions
163
163
 
164
- # library "pathname", "set", "securerandom" # Declare library signatures to load
164
+ # library "pathname", "securerandom" # Declare library signatures to load
165
165
  testing "::<%= target %>"
166
166
 
167
167
  <%- instance_methods.each do |method_name, definition| %>
data/Steepfile CHANGED
@@ -14,6 +14,7 @@ target :lib do
14
14
  signature "stdlib/strscan/0/"
15
15
  signature "stdlib/optparse/0/"
16
16
  signature "stdlib/rdoc/0/"
17
+ signature "stdlib/ripper/0"
17
18
 
18
19
  configure_code_diagnostics do |config|
19
20
  config[D::Ruby::MethodDefinitionMissing] = :hint