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
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 86a893f83a116311b7161ef437a811c4c81adae584063b690acf0711f94eb633
4
- data.tar.gz: d5cdbec208cd2c8c7671712e1e94215e1d83ea487d6eb9eca8499d0d3016b9a0
3
+ metadata.gz: 51a3619d5a207208fefbe7520651b507cf7ba1abdbafb023ad562eac414a3fbd
4
+ data.tar.gz: beda4f39d5472acccb31d105306cf510e6195fb55cbdbde7affeb8a02feaad6c
5
5
  SHA512:
6
- metadata.gz: e17695da454b8df97db782759c1e63f7d01af6a33ec258c43ec0c1759fa6c768d83e4b9a5cd98c7229370bfad0c2865c202b06fcb86568821ec62148139fbbf0
7
- data.tar.gz: 274d1c7db8d8e97e68ede7d0f21ed69b9a2403243c1f5c0e1c02429b669f3b0ff1d6c28e8c7d64b4ff658bd22c4f20b0d3318bf396e1cdd6dcca8ceca9f2bb3c
6
+ metadata.gz: 323131b69f6b0ed044c97a9187863e73f0e71bfb5bb8d365acc5a7fedb4603d988782505b8a6997efcc9720b087d78ce5f860321513adfb922a0dc3f686c200b
7
+ data.tar.gz: 02c19b9c330fb78fc80e3fe426d5a4dc5dcf4c605744b1eef957e92e40dd6948f40fd09f61b0b2b535ea5ec43e33d95b4b54d412e9f7120e87d4db0ffa65eaa0
@@ -29,7 +29,7 @@ jobs:
29
29
  job: stdlib_test
30
30
  rubyopt: "--enable-frozen-string-literal"
31
31
  - ruby: "3.3"
32
- job: lexer compile confirm_lexer
32
+ job: lexer templates compile confirm_lexer confirm_templates
33
33
  - ruby: "3.3"
34
34
  job: rubocop validate test_doc build test_generate_stdlib raap
35
35
  - ruby: "3.3"
@@ -20,7 +20,9 @@ jobs:
20
20
  uses: ruby/setup-ruby@v1
21
21
  with:
22
22
  ruby-version: ${{ matrix.ruby }}
23
- - name: rake-compiler
24
- run: gem install rake-compiler
23
+ - name: bundle install
24
+ run: |
25
+ bundle config set without profilers libs
26
+ bundle install
25
27
  - name: compile
26
- run: rake compile
28
+ run: bundle exec rake compile
data/.gitignore CHANGED
@@ -19,4 +19,5 @@ lib/**/*.bundle
19
19
  lib/**/*.so
20
20
  lib/**/*.dll
21
21
  doc/
22
+
22
23
  **/*.gem
data/.rubocop.yml CHANGED
@@ -28,11 +28,17 @@ RBS/Lint:
28
28
  Exclude:
29
29
  - 'sig/**/*'
30
30
  - 'test/**/*'
31
+ RBS/Lint/TopLevelInterface:
32
+ Enabled: false
33
+ RBS/Lint/TopLevelTypeAlias:
34
+ Enabled: false
31
35
  RBS/Style:
32
36
  Enabled: false
33
37
  Exclude:
34
38
  - 'sig/**/*'
35
39
  - 'test/**/*'
40
+ RBS/Style/EmptyArgument:
41
+ Enabled: true
36
42
  RBS/Style/InitializeReturnType:
37
43
  Enabled: true
38
44
 
data/CHANGELOG.md CHANGED
@@ -1,5 +1,58 @@
1
1
  # CHANGELOG
2
2
 
3
+ ## 3.7.0 (2024-12-05)
4
+
5
+ ### Miscellaneous
6
+
7
+ * bundle update mutex_m ([#2122](https://github.com/ruby/rbs/pull/2122))
8
+
9
+ ## 3.7.0.pre.1 (2024-12-05)
10
+
11
+ ### Signature updates
12
+
13
+ * `CGI.accept_charset` ([#2045](https://github.com/ruby/rbs/pull/2045))
14
+ * `IO#readline`, `IO#readlines` ([#2059](https://github.com/ruby/rbs/pull/2059))
15
+ * `Kernel#proc` ([#2036](https://github.com/ruby/rbs/pull/2036))
16
+ * `Kernel#system` ([#2075](https://github.com/ruby/rbs/pull/2075))
17
+ * `Object#to_yaml` ([#2107](https://github.com/ruby/rbs/pull/2107))
18
+ * `OpenSSL::Digest` ([#2108](https://github.com/ruby/rbs/pull/2108))
19
+ * `OpenSSL.base64digest` ([#2078](https://github.com/ruby/rbs/pull/2078))
20
+ * `Process.detach` ([#2083](https://github.com/ruby/rbs/pull/2083))
21
+
22
+ ### Library changes
23
+
24
+ * Reduce object allocation for record type ([#2118](https://github.com/ruby/rbs/pull/2118))
25
+ * Milestone to graduate stringio from core. ([#2114](https://github.com/ruby/rbs/pull/2114))
26
+ * Mark all internal `parse_` methods as `static` ([#2103](https://github.com/ruby/rbs/pull/2103))
27
+ * Add templating mechanism to automatically generate `.c`/`.h` files ([#2098](https://github.com/ruby/rbs/pull/2098))
28
+ * Remove unused `rbs_unescape_string` declaration ([#2058](https://github.com/ruby/rbs/pull/2058))
29
+ * Fix UntypedFunction does not provide #map_type_name ([#2054](https://github.com/ruby/rbs/pull/2054))
30
+ * Better `instance_eval`/`instance_exec` detection ([#2052](https://github.com/ruby/rbs/pull/2052))
31
+ * Overload annotations ([#2049](https://github.com/ruby/rbs/pull/2049))
32
+
33
+ #### rbs prototype
34
+
35
+ * prototype rb: Fix crashed by self::CONST ([#2079](https://github.com/ruby/rbs/pull/2079))
36
+
37
+ #### rbs collection
38
+
39
+ * mutex_m support ([#2115](https://github.com/ruby/rbs/pull/2115))
40
+
41
+ ### Miscellaneous
42
+
43
+ * Use `File.open` with block ([#2119](https://github.com/ruby/rbs/pull/2119))
44
+ * Compile without activesupport ([#2105](https://github.com/ruby/rbs/pull/2105))
45
+ * docs: Add singleton attribute members to syntax.md ([#2090](https://github.com/ruby/rbs/pull/2090))
46
+ * Bundle update rubocop-on-rbs ([#2094](https://github.com/ruby/rbs/pull/2094))
47
+ * `bundle exec` on windows ([#2101](https://github.com/ruby/rbs/pull/2101))
48
+ * Fix typos ([#2097](https://github.com/ruby/rbs/pull/2097))
49
+ * Bundle update json 2.8.2 ([#2095](https://github.com/ruby/rbs/pull/2095))
50
+ * Skip `rbs` gem validation ([#2084](https://github.com/ruby/rbs/pull/2084))
51
+ * Skip PTY_test with Windows platform ([#2055](https://github.com/ruby/rbs/pull/2055))
52
+ * Randomize stdlib test order to uncover hidden assumptions ([#2043](https://github.com/ruby/rbs/pull/2043))
53
+ * Suppress `inline` is not at beginning of declaration for melt_array ([#2050](https://github.com/ruby/rbs/pull/2050))
54
+ * Skip `mkpath` test with 3.4 ([#2053](https://github.com/ruby/rbs/pull/2053))
55
+
3
56
  ## 3.6.1 (2024-10-03)
4
57
 
5
58
  ### Library changes
data/Rakefile CHANGED
@@ -30,10 +30,22 @@ task :confirm_lexer => :lexer do
30
30
  sh "git diff --exit-code ext/rbs_extension/lexer.c"
31
31
  end
32
32
 
33
+ task :confirm_templates => :templates do
34
+ puts "Testing if generated code under include and src is updated with respect to templates"
35
+ sh "git diff --exit-code -- include src"
36
+ end
37
+
33
38
  rule ".c" => ".re" do |t|
34
39
  puts "⚠️⚠️⚠️ #{t.name} is older than #{t.source}. You may need to run `rake lexer` ⚠️⚠️⚠️"
35
40
  end
36
41
 
42
+ rule %r{^src/(.*)\.c} => 'templates/%X.c.erb' do |t|
43
+ puts "⚠️⚠️⚠️ #{t.name} is older than #{t.source}. You may need to run `rake templates` ⚠️⚠️⚠️"
44
+ end
45
+ rule %r{^include/(.*)\.c} => 'templates/%X.c.erb' do |t|
46
+ puts "⚠️⚠️⚠️ #{t.name} is older than #{t.source}. You may need to run `rake templates` ⚠️⚠️⚠️"
47
+ end
48
+
37
49
  task :annotate do
38
50
  sh "bin/generate_docs.sh"
39
51
  end
@@ -43,7 +55,18 @@ task :confirm_annotation do
43
55
  sh "git diff --exit-code core stdlib"
44
56
  end
45
57
 
58
+ task :templates do
59
+ sh "#{ruby} templates/template.rb include/rbs/constants.h"
60
+ sh "#{ruby} templates/template.rb include/rbs/ruby_objs.h"
61
+ sh "#{ruby} templates/template.rb src/constants.c"
62
+ sh "#{ruby} templates/template.rb src/ruby_objs.c"
63
+ end
64
+
46
65
  task :compile => "ext/rbs_extension/lexer.c"
66
+ task :compile => "include/rbs/constants.h"
67
+ task :compile => "include/rbs/ruby_objs.h"
68
+ task :compile => "src/constants.c"
69
+ task :compile => "src/ruby_objs.c"
47
70
 
48
71
  task :test_doc do
49
72
  files = Dir.chdir(File.expand_path('..', __FILE__)) do
data/config.yml ADDED
@@ -0,0 +1,311 @@
1
+ nodes:
2
+ - name: RBS::AST::Annotation
3
+ fields:
4
+ - name: string
5
+ - name: location
6
+ - name: RBS::AST::Comment
7
+ fields:
8
+ - name: string
9
+ - name: location
10
+ - name: RBS::AST::Declarations::Class
11
+ fields:
12
+ - name: name
13
+ - name: type_params
14
+ - name: super_class
15
+ - name: members
16
+ - name: annotations
17
+ - name: location
18
+ - name: comment
19
+ - name: RBS::AST::Declarations::Class::Super
20
+ fields:
21
+ - name: name
22
+ - name: args
23
+ - name: location
24
+ - name: RBS::AST::Declarations::ClassAlias
25
+ fields:
26
+ - name: new_name
27
+ - name: old_name
28
+ - name: location
29
+ - name: comment
30
+ - name: RBS::AST::Declarations::Constant
31
+ fields:
32
+ - name: name
33
+ - name: type
34
+ - name: location
35
+ - name: comment
36
+ - name: RBS::AST::Declarations::Global
37
+ fields:
38
+ - name: name
39
+ - name: type
40
+ - name: location
41
+ - name: comment
42
+ - name: RBS::AST::Declarations::Interface
43
+ fields:
44
+ - name: name
45
+ - name: type_params
46
+ - name: members
47
+ - name: annotations
48
+ - name: location
49
+ - name: comment
50
+ - name: RBS::AST::Declarations::Module
51
+ fields:
52
+ - name: name
53
+ - name: type_params
54
+ - name: self_types
55
+ - name: members
56
+ - name: annotations
57
+ - name: location
58
+ - name: comment
59
+ - name: RBS::AST::Declarations::Module::Self
60
+ fields:
61
+ - name: name
62
+ - name: args
63
+ - name: location
64
+ - name: RBS::AST::Declarations::ModuleAlias
65
+ fields:
66
+ - name: new_name
67
+ - name: old_name
68
+ - name: location
69
+ - name: comment
70
+ - name: RBS::AST::Declarations::TypeAlias
71
+ fields:
72
+ - name: name
73
+ - name: type_params
74
+ - name: type
75
+ - name: annotations
76
+ - name: location
77
+ - name: comment
78
+ - name: RBS::AST::Directives::Use
79
+ fields:
80
+ - name: clauses
81
+ - name: location
82
+ - name: RBS::AST::Directives::Use::SingleClause
83
+ fields:
84
+ - name: type_name
85
+ - name: new_name
86
+ - name: location
87
+ - name: RBS::AST::Directives::Use::WildcardClause
88
+ fields:
89
+ - name: namespace
90
+ - name: location
91
+ - name: RBS::AST::Members::Alias
92
+ fields:
93
+ - name: new_name
94
+ - name: old_name
95
+ - name: kind
96
+ - name: annotations
97
+ - name: location
98
+ - name: comment
99
+ - name: RBS::AST::Members::AttrAccessor
100
+ fields:
101
+ - name: name
102
+ - name: type
103
+ - name: ivar_name
104
+ - name: kind
105
+ - name: annotations
106
+ - name: location
107
+ - name: comment
108
+ - name: visibility
109
+ - name: RBS::AST::Members::AttrReader
110
+ fields:
111
+ - name: name
112
+ - name: type
113
+ - name: ivar_name
114
+ - name: kind
115
+ - name: annotations
116
+ - name: location
117
+ - name: comment
118
+ - name: visibility
119
+ - name: RBS::AST::Members::AttrWriter
120
+ fields:
121
+ - name: name
122
+ - name: type
123
+ - name: ivar_name
124
+ - name: kind
125
+ - name: annotations
126
+ - name: location
127
+ - name: comment
128
+ - name: visibility
129
+ - name: RBS::AST::Members::ClassInstanceVariable
130
+ fields:
131
+ - name: name
132
+ - name: type
133
+ - name: location
134
+ - name: comment
135
+ - name: RBS::AST::Members::ClassVariable
136
+ fields:
137
+ - name: name
138
+ - name: type
139
+ - name: location
140
+ - name: comment
141
+ - name: RBS::AST::Members::Extend
142
+ fields:
143
+ - name: name
144
+ - name: args
145
+ - name: annotations
146
+ - name: location
147
+ - name: comment
148
+ - name: RBS::AST::Members::Include
149
+ fields:
150
+ - name: name
151
+ - name: args
152
+ - name: annotations
153
+ - name: location
154
+ - name: comment
155
+ - name: RBS::AST::Members::InstanceVariable
156
+ fields:
157
+ - name: name
158
+ - name: type
159
+ - name: location
160
+ - name: comment
161
+ - name: RBS::AST::Members::MethodDefinition
162
+ fields:
163
+ - name: name
164
+ - name: kind
165
+ - name: overloads
166
+ - name: annotations
167
+ - name: location
168
+ - name: comment
169
+ - name: overloading
170
+ - name: visibility
171
+ - name: RBS::AST::Members::MethodDefinition::Overload
172
+ fields:
173
+ - name: annotations
174
+ - name: method_type
175
+ - name: RBS::AST::Members::Prepend
176
+ fields:
177
+ - name: name
178
+ - name: args
179
+ - name: annotations
180
+ - name: location
181
+ - name: comment
182
+ - name: RBS::AST::Members::Private
183
+ fields:
184
+ - name: location
185
+ - name: RBS::AST::Members::Public
186
+ fields:
187
+ - name: location
188
+ - name: RBS::AST::TypeParam
189
+ fields:
190
+ - name: name
191
+ - name: variance
192
+ - name: upper_bound
193
+ - name: default_type
194
+ - name: location
195
+ - name: RBS::MethodType
196
+ fields:
197
+ - name: type_params
198
+ - name: type
199
+ - name: block
200
+ - name: location
201
+ - name: RBS::Namespace
202
+ fields:
203
+ - name: path
204
+ - name: absolute
205
+ - name: RBS::TypeName
206
+ fields:
207
+ - name: namespace
208
+ - name: name
209
+ - name: RBS::Types::Alias
210
+ fields:
211
+ - name: name
212
+ - name: args
213
+ - name: location
214
+ - name: RBS::Types::Bases::Any
215
+ fields:
216
+ - name: location
217
+ - name: RBS::Types::Bases::Bool
218
+ fields:
219
+ - name: location
220
+ - name: RBS::Types::Bases::Bottom
221
+ fields:
222
+ - name: location
223
+ - name: RBS::Types::Bases::Class
224
+ fields:
225
+ - name: location
226
+ - name: RBS::Types::Bases::Instance
227
+ fields:
228
+ - name: location
229
+ - name: RBS::Types::Bases::Nil
230
+ fields:
231
+ - name: location
232
+ - name: RBS::Types::Bases::Self
233
+ fields:
234
+ - name: location
235
+ - name: RBS::Types::Bases::Top
236
+ fields:
237
+ - name: location
238
+ - name: RBS::Types::Bases::Void
239
+ fields:
240
+ - name: location
241
+ - name: RBS::Types::Block
242
+ fields:
243
+ - name: type
244
+ - name: required
245
+ - name: self_type
246
+ - name: RBS::Types::ClassInstance
247
+ fields:
248
+ - name: name
249
+ - name: args
250
+ - name: location
251
+ - name: RBS::Types::ClassSingleton
252
+ fields:
253
+ - name: name
254
+ - name: location
255
+ - name: RBS::Types::Function
256
+ fields:
257
+ - name: required_positionals
258
+ - name: optional_positionals
259
+ - name: rest_positionals
260
+ - name: trailing_positionals
261
+ - name: required_keywords
262
+ - name: optional_keywords
263
+ - name: rest_keywords
264
+ - name: return_type
265
+ - name: RBS::Types::Function::Param
266
+ fields:
267
+ - name: type
268
+ - name: name
269
+ - name: location
270
+ - name: RBS::Types::Interface
271
+ fields:
272
+ - name: name
273
+ - name: args
274
+ - name: location
275
+ - name: RBS::Types::Intersection
276
+ fields:
277
+ - name: types
278
+ - name: location
279
+ - name: RBS::Types::Literal
280
+ fields:
281
+ - name: literal
282
+ - name: location
283
+ - name: RBS::Types::Optional
284
+ fields:
285
+ - name: type
286
+ - name: location
287
+ - name: RBS::Types::Proc
288
+ fields:
289
+ - name: type
290
+ - name: block
291
+ - name: location
292
+ - name: self_type
293
+ - name: RBS::Types::Record
294
+ fields:
295
+ - name: all_fields
296
+ - name: location
297
+ - name: RBS::Types::Tuple
298
+ fields:
299
+ - name: types
300
+ - name: location
301
+ - name: RBS::Types::Union
302
+ fields:
303
+ - name: types
304
+ - name: location
305
+ - name: RBS::Types::UntypedFunction
306
+ fields:
307
+ - name: return_type
308
+ - name: RBS::Types::Variable
309
+ fields:
310
+ - name: name
311
+ - name: location
data/core/dir.rbs CHANGED
@@ -784,7 +784,7 @@ class Dir
784
784
  # caveats.
785
785
  #
786
786
  def chdir: () -> Integer
787
- | [T] { () -> T } -> T
787
+ | [T] () { () -> T } -> T
788
788
 
789
789
  # <!--
790
790
  # rdoc-file=dir.c
data/core/kernel.rbs CHANGED
@@ -2056,8 +2056,8 @@ module Kernel : BasicObject
2056
2056
  #
2057
2057
  # Raises an exception if the new process could not execute.
2058
2058
  #
2059
- def self?.system: (String command, *String args, ?unsetenv_others: boolish, ?pgroup: true | Integer, ?umask: Integer, ?in: redirect_fd, ?out: redirect_fd, ?err: redirect_fd, ?close_others: boolish, ?chdir: String) -> (NilClass | FalseClass | TrueClass)
2060
- | (Hash[string, string?] env, String command, *String args, ?unsetenv_others: boolish, ?pgroup: true | Integer, ?umask: Integer, ?in: redirect_fd, ?out: redirect_fd, ?err: redirect_fd, ?close_others: boolish, ?chdir: String) -> (NilClass | FalseClass | TrueClass)
2059
+ def self?.system: (String command, *String args, ?unsetenv_others: boolish, ?pgroup: true | Integer, ?umask: Integer, ?in: redirect_fd, ?out: redirect_fd, ?err: redirect_fd, ?close_others: boolish, ?chdir: String, ?exception: bool) -> (NilClass | FalseClass | TrueClass)
2060
+ | (Hash[string, string?] env, String command, *String args, ?unsetenv_others: boolish, ?pgroup: true | Integer, ?umask: Integer, ?in: redirect_fd, ?out: redirect_fd, ?err: redirect_fd, ?close_others: boolish, ?chdir: String, ?exception: bool) -> (NilClass | FalseClass | TrueClass)
2061
2061
 
2062
2062
  # <!--
2063
2063
  # rdoc-file=object.c
data/core/process.rbs CHANGED
@@ -615,7 +615,7 @@ module Process
615
615
  #
616
616
  # thread.join.pid # => 313262
617
617
  #
618
- def self.detach: (Integer pid) -> Thread
618
+ def self.detach: (Integer pid) -> Process::Waiter
619
619
 
620
620
  # <!--
621
621
  # rdoc-file=process.c
data/core/set.rbs CHANGED
@@ -629,5 +629,5 @@ module Enumerable[unchecked out Elem]
629
629
  # Needs to `require "set"` to use this method.
630
630
  #
631
631
  def to_set: () -> Set[Elem]
632
- | [T] { (Elem) -> T } -> Set[T]
632
+ | [T] () { (Elem) -> T } -> Set[T]
633
633
  end
data/docs/syntax.md CHANGED
@@ -416,10 +416,12 @@ _method-types_ ::= _method-type-parameters_ _method-type_
416
416
  _method-type-parameters_ ::= # Empty
417
417
  | `[` _type-variable_ `,` ... `]`
418
418
 
419
- _attribute-member_ ::= _visibility_ _attribute-type_ _method-name_ `:` _type_ # Attribute
420
- | _visibility_ _attribute-type_ _method-name_ `(` _ivar-name_ `) :` _type_ # Attribute with variable name specification
421
- | _visibility_ _attribute-type_ _method-name_ `() :` _type_ # Attribute without variable
422
-
419
+ _attribute-member_ ::= _visibility_ _attribute-type_ _method-name_ `:` _type_ # Attribute
420
+ | _visibility_ _attribute-type_ _method-name_ `(` _ivar-name_ `) :` _type_ # Attribute with variable name specification
421
+ | _visibility_ _attribute-type_ _method-name_ `() :` _type_ # Attribute without variable
422
+ | _visibility_ _attribute-type_ `self.` _method-name_ `:` _type_ # Singleton attribute
423
+ | _visibility_ _attribute-type_ `self.` _method-name_ `(` _ivar-name_ `) :` _type_ # Singleton attribute with variable name specification
424
+ | _visibility_ _attribute-type_ `self.` _method-name_ `() :` _type_ # Singleton attribute without variable
423
425
  _visibility_ ::= `public` | `private`
424
426
 
425
427
  _attribute-type_ ::= `attr_reader` | `attr_writer` | `attr_accessor`
@@ -1,4 +1,14 @@
1
1
  require 'mkmf'
2
+
2
3
  $INCFLAGS << " -I$(top_srcdir)" if $extmk
4
+ $INCFLAGS << " -I$(srcdir)/../../include"
5
+
6
+ $VPATH << "$(srcdir)/../../src"
7
+ $VPATH << "$(srcdir)/ext/rbs_extension"
8
+
9
+ root_dir = File.expand_path('../../../', __FILE__)
10
+ $srcs = Dir.glob("#{root_dir}/src/*.c") +
11
+ Dir.glob("#{root_dir}/ext/rbs_extension/*.c")
12
+
3
13
  append_cflags ['-std=gnu99']
4
14
  create_makefile 'rbs_extension'