rbs 3.8.0 → 3.8.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.
- checksums.yaml +4 -4
- data/.github/workflows/comments.yml +3 -3
- data/.github/workflows/ruby.yml +7 -7
- data/.rubocop.yml +7 -0
- data/CHANGELOG.md +14 -0
- data/core/exception.rbs +147 -38
- data/core/gc.rbs +1 -1
- data/core/kernel.rbs +56 -14
- data/core/ractor.rbs +4 -1
- data/core/regexp.rbs +4 -2
- data/core/ruby_vm.rbs +8 -8
- data/core/time.rbs +1 -1
- data/lib/rbs/version.rb +1 -1
- data/stdlib/monitor/0/monitor.rbs +13 -4
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a48774543c23555bbcb9c6a13b387db3069fe4c65d534a7915798e85d37fa770
|
4
|
+
data.tar.gz: 034e53e2be22a3ca9ac15b8f95585c8fe42bf2267268f1eb23cffe2e92098213
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 31c29db0f7d38c22d3ab9c3ee5df5403bba9b489b38211fdd824b76f948e89efafd4b2e3afe81ec9420b3a76c350daccb5b23dddd57d85199a93531fd28e73b3
|
7
|
+
data.tar.gz: d8077101a4f4f26073d047ad4c7b04752f7e1849a1b3bdcfc41703e82b6b109d68e8c295ed2a0af57fc5e5744600ad89b77f24b1b93fbee226b42bd5d86493ee
|
@@ -10,13 +10,13 @@ on:
|
|
10
10
|
jobs:
|
11
11
|
comments:
|
12
12
|
runs-on: "ubuntu-latest"
|
13
|
-
env:
|
14
|
-
|
13
|
+
# env:
|
14
|
+
# RUBY_COMMIT: 1b0c46daed9186b82ab4fef1a4ab225afe582ee6
|
15
15
|
steps:
|
16
16
|
- uses: actions/checkout@v4
|
17
17
|
- uses: ruby/setup-ruby@v1
|
18
18
|
with:
|
19
|
-
ruby-version: "3.4.
|
19
|
+
ruby-version: "3.4.1"
|
20
20
|
bundler: none
|
21
21
|
- name: Install dependencies
|
22
22
|
run: |
|
data/.github/workflows/ruby.yml
CHANGED
@@ -13,26 +13,26 @@ jobs:
|
|
13
13
|
strategy:
|
14
14
|
fail-fast: false
|
15
15
|
matrix:
|
16
|
-
ruby: ['3.1', '3.2', '3.3', '3.4
|
16
|
+
ruby: ['3.1', '3.2', '3.3', '3.4', head]
|
17
17
|
rubyopt: [""]
|
18
18
|
job:
|
19
19
|
- test
|
20
20
|
include:
|
21
21
|
- ruby: head
|
22
22
|
job: stdlib_test rubocop
|
23
|
-
- ruby: "3.4
|
23
|
+
- ruby: "3.4"
|
24
24
|
job: stdlib_test
|
25
|
-
- ruby: "3.4
|
25
|
+
- ruby: "3.4"
|
26
26
|
job: test
|
27
27
|
rubyopt: "--enable-frozen-string-literal"
|
28
|
-
- ruby: "3.4
|
28
|
+
- ruby: "3.4"
|
29
29
|
job: stdlib_test
|
30
30
|
rubyopt: "--enable-frozen-string-literal"
|
31
|
-
- ruby: "3.4
|
31
|
+
- ruby: "3.4"
|
32
32
|
job: lexer templates compile confirm_lexer confirm_templates
|
33
|
-
- ruby: "3.4
|
33
|
+
- ruby: "3.4"
|
34
34
|
job: rubocop validate test_doc build test_generate_stdlib raap
|
35
|
-
- ruby: "3.4
|
35
|
+
- ruby: "3.4"
|
36
36
|
job: typecheck_test
|
37
37
|
env:
|
38
38
|
RANDOMIZE_STDLIB_TEST_ORDER: "true"
|
data/.rubocop.yml
CHANGED
@@ -15,6 +15,7 @@ Rubycw/Rubycw:
|
|
15
15
|
|
16
16
|
RBS:
|
17
17
|
Enabled: true
|
18
|
+
|
18
19
|
RBS/Layout:
|
19
20
|
Enabled: true
|
20
21
|
Exclude:
|
@@ -23,6 +24,7 @@ RBS/Layout:
|
|
23
24
|
RBS/Layout/CommentIndentation:
|
24
25
|
Exclude:
|
25
26
|
- core/string.rbs
|
27
|
+
|
26
28
|
RBS/Lint:
|
27
29
|
Enabled: true
|
28
30
|
Exclude:
|
@@ -32,6 +34,11 @@ RBS/Lint/TopLevelInterface:
|
|
32
34
|
Enabled: false
|
33
35
|
RBS/Lint/TopLevelTypeAlias:
|
34
36
|
Enabled: false
|
37
|
+
RBS/Lint/AmbiguousKeywordArgumentKey:
|
38
|
+
Exclude:
|
39
|
+
# OpenSSL::KDF.scrypt
|
40
|
+
- 'stdlib/openssl/0/openssl.rbs'
|
41
|
+
|
35
42
|
RBS/Style:
|
36
43
|
Enabled: false
|
37
44
|
Exclude:
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,19 @@
|
|
1
1
|
# CHANGELOG
|
2
2
|
|
3
|
+
## 3.8.1 (2024-12-27)
|
4
|
+
|
5
|
+
### Signature updates
|
6
|
+
|
7
|
+
* `Ractor.store_if_absent` ([#2206](https://github.com/ruby/rbs/pull/2206))
|
8
|
+
* `Time#iso860t1` ([#2207](https://github.com/ruby/rbs/pull/2207))
|
9
|
+
* `Time#xmlschema` ([#2207](https://github.com/ruby/rbs/pull/2207))
|
10
|
+
|
11
|
+
### Miscellaneous
|
12
|
+
|
13
|
+
* Update rubocop-on-rbs ([#2200](https://github.com/ruby/rbs/pull/2200))
|
14
|
+
* Update docs based on Ruby 3.4.1 ([#2208](https://github.com/ruby/rbs/pull/2208))
|
15
|
+
* Ruby 3.4.1 ([#2206](https://github.com/ruby/rbs/pull/2206))
|
16
|
+
|
3
17
|
## 3.8.0 (2024-12-24)
|
4
18
|
|
5
19
|
### Signature updates
|
data/core/exception.rbs
CHANGED
@@ -99,24 +99,31 @@ class Exception
|
|
99
99
|
# rdoc-file=error.c
|
100
100
|
# - backtrace -> array or nil
|
101
101
|
# -->
|
102
|
-
# Returns
|
103
|
-
#
|
102
|
+
# Returns the backtrace (the list of code locations that led to the exception),
|
103
|
+
# as an array of strings.
|
104
104
|
#
|
105
|
-
#
|
106
|
-
# given by `Exception#backtrace_locations.map {|loc| loc.to_s }`. This is
|
107
|
-
# the normal case, where the backtrace value was stored by Kernel#raise.
|
108
|
-
# * Array of strings: returns that array. This is the unusual case, where the
|
109
|
-
# backtrace value was explicitly stored as an array of strings.
|
110
|
-
# * `nil`: returns `nil`.
|
105
|
+
# Example (assuming the code is stored in the file named `t.rb`):
|
111
106
|
#
|
112
|
-
#
|
107
|
+
# def division(numerator, denominator)
|
108
|
+
# numerator / denominator
|
109
|
+
# end
|
113
110
|
#
|
114
111
|
# begin
|
115
|
-
# 1
|
116
|
-
# rescue =>
|
117
|
-
#
|
112
|
+
# division(1, 0)
|
113
|
+
# rescue => ex
|
114
|
+
# p ex.backtrace
|
115
|
+
# # ["t.rb:2:in 'Integer#/'", "t.rb:2:in 'Object#division'", "t.rb:6:in '<main>'"]
|
116
|
+
# loc = ex.backtrace.first
|
117
|
+
# p loc.class
|
118
|
+
# # String
|
118
119
|
# end
|
119
|
-
#
|
120
|
+
#
|
121
|
+
# The value returned by this method migth be adjusted when raising (see
|
122
|
+
# Kernel#raise), or during intermediate handling by #set_backtrace.
|
123
|
+
#
|
124
|
+
# See also #backtrace_locations that provide the same value, as structured
|
125
|
+
# objects. (Note though that two values might not be consistent with each other
|
126
|
+
# when backtraces are manually adjusted.)
|
120
127
|
#
|
121
128
|
# see [Backtraces](rdoc-ref:exceptions.md@Backtraces).
|
122
129
|
#
|
@@ -126,20 +133,37 @@ class Exception
|
|
126
133
|
# rdoc-file=error.c
|
127
134
|
# - backtrace_locations -> array or nil
|
128
135
|
# -->
|
129
|
-
# Returns
|
130
|
-
#
|
136
|
+
# Returns the backtrace (the list of code locations that led to the exception),
|
137
|
+
# as an array of Thread::Backtrace::Location instances.
|
131
138
|
#
|
132
|
-
#
|
133
|
-
# * Array of strings or `nil`: returns `nil`.
|
139
|
+
# Example (assuming the code is stored in the file named `t.rb`):
|
134
140
|
#
|
135
|
-
#
|
141
|
+
# def division(numerator, denominator)
|
142
|
+
# numerator / denominator
|
143
|
+
# end
|
136
144
|
#
|
137
145
|
# begin
|
138
|
-
# 1
|
139
|
-
# rescue =>
|
140
|
-
#
|
146
|
+
# division(1, 0)
|
147
|
+
# rescue => ex
|
148
|
+
# p ex.backtrace_locations
|
149
|
+
# # ["t.rb:2:in 'Integer#/'", "t.rb:2:in 'Object#division'", "t.rb:6:in '<main>'"]
|
150
|
+
# loc = ex.backtrace_locations.first
|
151
|
+
# p loc.class
|
152
|
+
# # Thread::Backtrace::Location
|
153
|
+
# p loc.path
|
154
|
+
# # "t.rb"
|
155
|
+
# p loc.lineno
|
156
|
+
# # 2
|
157
|
+
# p loc.label
|
158
|
+
# # "Integer#/"
|
141
159
|
# end
|
142
|
-
#
|
160
|
+
#
|
161
|
+
# The value returned by this method might be adjusted when raising (see
|
162
|
+
# Kernel#raise), or during intermediate handling by #set_backtrace.
|
163
|
+
#
|
164
|
+
# See also #backtrace that provide the same value as an array of strings. (Note
|
165
|
+
# though that two values might not be consistent with each other when backtraces
|
166
|
+
# are manually adjusted.)
|
143
167
|
#
|
144
168
|
# See [Backtraces](rdoc-ref:exceptions.md@Backtraces).
|
145
169
|
#
|
@@ -294,15 +318,100 @@ class Exception
|
|
294
318
|
# rdoc-file=error.c
|
295
319
|
# - set_backtrace(value) -> value
|
296
320
|
# -->
|
297
|
-
# Sets the backtrace value for `self`; returns the given
|
321
|
+
# Sets the backtrace value for `self`; returns the given `value`.
|
298
322
|
#
|
299
|
-
#
|
300
|
-
# x.set_backtrace(%w[foo bar baz]) # => ["foo", "bar", "baz"]
|
301
|
-
# x.backtrace # => ["foo", "bar", "baz"]
|
323
|
+
# The `value` might be:
|
302
324
|
#
|
303
|
-
#
|
325
|
+
# * an array of Thread::Backtrace::Location;
|
326
|
+
# * an array of String instances;
|
327
|
+
# * a single String instance; or
|
328
|
+
# * `nil`.
|
329
|
+
#
|
330
|
+
# Using array of Thread::Backtrace::Location is the most consistent option: it
|
331
|
+
# sets both #backtrace and #backtrace_locations. It should be preferred when
|
332
|
+
# possible. The suitable array of locations can be obtained from
|
333
|
+
# Kernel#caller_locations, copied from another error, or just set to the
|
334
|
+
# adjusted result of the current error's #backtrace_locations:
|
335
|
+
#
|
336
|
+
# require 'json'
|
337
|
+
#
|
338
|
+
# def parse_payload(text)
|
339
|
+
# JSON.parse(text) # test.rb, line 4
|
340
|
+
# rescue JSON::ParserError => ex
|
341
|
+
# ex.set_backtrace(ex.backtrace_locations[2...])
|
342
|
+
# raise
|
343
|
+
# end
|
304
344
|
#
|
305
|
-
#
|
345
|
+
# parse_payload('{"wrong: "json"')
|
346
|
+
# # test.rb:4:in 'Object#parse_payload': unexpected token at '{"wrong: "json"' (JSON::ParserError)
|
347
|
+
# #
|
348
|
+
# # An error points to the body of parse_payload method,
|
349
|
+
# # hiding the parts of the backtrace related to the internals
|
350
|
+
# # of the "json" library
|
351
|
+
#
|
352
|
+
# # The error has both #backtace and #backtrace_locations set
|
353
|
+
# # consistently:
|
354
|
+
# begin
|
355
|
+
# parse_payload('{"wrong: "json"')
|
356
|
+
# rescue => ex
|
357
|
+
# p ex.backtrace
|
358
|
+
# # ["test.rb:4:in 'Object#parse_payload'", "test.rb:20:in '<main>'"]
|
359
|
+
# p ex.backtrace_locations
|
360
|
+
# # ["test.rb:4:in 'Object#parse_payload'", "test.rb:20:in '<main>'"]
|
361
|
+
# end
|
362
|
+
#
|
363
|
+
# When the desired stack of locations is not available and should be constructed
|
364
|
+
# from scratch, an array of strings or a singular string can be used. In this
|
365
|
+
# case, only #backtrace is affected:
|
366
|
+
#
|
367
|
+
# def parse_payload(text)
|
368
|
+
# JSON.parse(text)
|
369
|
+
# rescue JSON::ParserError => ex
|
370
|
+
# ex.set_backtrace(["dsl.rb:34", "framework.rb:1"])
|
371
|
+
# # The error have the new value in #backtrace:
|
372
|
+
# p ex.backtrace
|
373
|
+
# # ["dsl.rb:34", "framework.rb:1"]
|
374
|
+
#
|
375
|
+
# # but the original one in #backtrace_locations
|
376
|
+
# p ex.backtrace_locations
|
377
|
+
# # [".../json/common.rb:221:in 'JSON::Ext::Parser.parse'", ...]
|
378
|
+
# end
|
379
|
+
#
|
380
|
+
# parse_payload('{"wrong: "json"')
|
381
|
+
#
|
382
|
+
# Calling #set_backtrace with `nil` clears up #backtrace but doesn't affect
|
383
|
+
# #backtrace_locations:
|
384
|
+
#
|
385
|
+
# def parse_payload(text)
|
386
|
+
# JSON.parse(text)
|
387
|
+
# rescue JSON::ParserError => ex
|
388
|
+
# ex.set_backtrace(nil)
|
389
|
+
# p ex.backtrace
|
390
|
+
# # nil
|
391
|
+
# p ex.backtrace_locations
|
392
|
+
# # [".../json/common.rb:221:in 'JSON::Ext::Parser.parse'", ...]
|
393
|
+
# end
|
394
|
+
#
|
395
|
+
# parse_payload('{"wrong: "json"')
|
396
|
+
#
|
397
|
+
# On reraising of such an exception, both #backtrace and #backtrace_locations is
|
398
|
+
# set to the place of reraising:
|
399
|
+
#
|
400
|
+
# def parse_payload(text)
|
401
|
+
# JSON.parse(text)
|
402
|
+
# rescue JSON::ParserError => ex
|
403
|
+
# ex.set_backtrace(nil)
|
404
|
+
# raise # test.rb, line 7
|
405
|
+
# end
|
406
|
+
#
|
407
|
+
# begin
|
408
|
+
# parse_payload('{"wrong: "json"')
|
409
|
+
# rescue => ex
|
410
|
+
# p ex.backtrace
|
411
|
+
# # ["test.rb:7:in 'Object#parse_payload'", "test.rb:11:in '<main>'"]
|
412
|
+
# p ex.backtrace_locations
|
413
|
+
# # ["test.rb:7:in 'Object#parse_payload'", "test.rb:11:in '<main>'"]
|
414
|
+
# end
|
306
415
|
#
|
307
416
|
# See [Backtraces](rdoc-ref:exceptions.md@Backtraces).
|
308
417
|
#
|
@@ -358,16 +467,16 @@ class Exception
|
|
358
467
|
# Output:
|
359
468
|
#
|
360
469
|
# "divided by 0"
|
361
|
-
# ["t.rb:3:in
|
362
|
-
# "\tfrom t.rb:3:in
|
363
|
-
# "\tfrom t.rb:10:in
|
364
|
-
# "\tfrom t.rb:11:in
|
365
|
-
# "\tfrom t.rb:12:in
|
366
|
-
# ["t.rb:3:in
|
367
|
-
# "\tfrom t.rb:3:in
|
368
|
-
# "\tfrom t.rb:10:in
|
369
|
-
# "\tfrom t.rb:11:in
|
370
|
-
# "\tfrom t.rb:12:in
|
470
|
+
# ["t.rb:3:in 'Integer#/': divided by 0 (ZeroDivisionError)",
|
471
|
+
# "\tfrom t.rb:3:in 'Object#baz'",
|
472
|
+
# "\tfrom t.rb:10:in 'Object#bar'",
|
473
|
+
# "\tfrom t.rb:11:in 'Object#foo'",
|
474
|
+
# "\tfrom t.rb:12:in '<main>'"]
|
475
|
+
# ["t.rb:3:in 'Integer#/': \e[1mdivided by 0 (\e[1;4mZeroDivisionError\e[m\e[1m)\e[m",
|
476
|
+
# "\tfrom t.rb:3:in 'Object#baz'",
|
477
|
+
# "\tfrom t.rb:10:in 'Object#bar'",
|
478
|
+
# "\tfrom t.rb:11:in 'Object#foo'",
|
479
|
+
# "\tfrom t.rb:12:in '<main>'"]
|
371
480
|
#
|
372
481
|
# An overriding method should be careful with ANSI code enhancements; see
|
373
482
|
# [Messages](rdoc-ref:exceptions.md@Messages).
|
data/core/gc.rbs
CHANGED
@@ -587,7 +587,7 @@ module GC
|
|
587
587
|
|
588
588
|
# The type that `GC.compact` and related functions can return.
|
589
589
|
#
|
590
|
-
type compact_info = Hash[:considered | :moved
|
590
|
+
type compact_info = Hash[:considered | :moved | :moved_up | :moved_down, Hash[Symbol, Integer]]
|
591
591
|
|
592
592
|
# <!--
|
593
593
|
# rdoc-file=gc.rb
|
data/core/kernel.rbs
CHANGED
@@ -936,16 +936,37 @@ module Kernel : BasicObject
|
|
936
936
|
#
|
937
937
|
# See [Messages](rdoc-ref:exceptions.md@Messages).
|
938
938
|
#
|
939
|
-
# Argument `backtrace`
|
940
|
-
#
|
941
|
-
#
|
939
|
+
# Argument `backtrace` might be used to modify the backtrace of the new
|
940
|
+
# exception, as reported by Exception#backtrace and
|
941
|
+
# Exception#backtrace_locations; the backtrace must be an array of
|
942
|
+
# Thread::Backtrace::Location, an array of strings, a single string, or `nil`.
|
943
|
+
#
|
944
|
+
# Using the array of Thread::Backtrace::Location instances is the most
|
945
|
+
# consistent option and should be preferred when possible. The necessary value
|
946
|
+
# might be obtained from #caller_locations, or copied from
|
947
|
+
# Exception#backtrace_locations of another error:
|
942
948
|
#
|
943
949
|
# begin
|
944
|
-
#
|
945
|
-
# rescue =>
|
946
|
-
#
|
950
|
+
# do_some_work()
|
951
|
+
# rescue ZeroDivisionError => ex
|
952
|
+
# raise(LogicalError, "You have an error in your math", ex.backtrace_locations)
|
953
|
+
# end
|
954
|
+
#
|
955
|
+
# The ways, both Exception#backtrace and Exception#backtrace_locations of the
|
956
|
+
# raised error are set to the same backtrace.
|
957
|
+
#
|
958
|
+
# When the desired stack of locations is not available and should be constructed
|
959
|
+
# from scratch, an array of strings or a singular string can be used. In this
|
960
|
+
# case, only Exception#backtrace is set:
|
961
|
+
#
|
962
|
+
# begin
|
963
|
+
# raise(StandardError, 'Boom', %w[dsl.rb:3 framework.rb:1])
|
964
|
+
# rescue => ex
|
965
|
+
# p ex.backtrace
|
966
|
+
# # => ["dsl.rb:3", "framework.rb:1"]
|
967
|
+
# p ex.backtrace_locations
|
968
|
+
# # => nil
|
947
969
|
# end
|
948
|
-
# # => ["foo", "bar", "baz"]
|
949
970
|
#
|
950
971
|
# If argument `backtrace` is not given, the backtrace is set according to an
|
951
972
|
# array of Thread::Backtrace::Location objects, as derived from the call stack.
|
@@ -1021,16 +1042,37 @@ module Kernel : BasicObject
|
|
1021
1042
|
#
|
1022
1043
|
# See [Messages](rdoc-ref:exceptions.md@Messages).
|
1023
1044
|
#
|
1024
|
-
# Argument `backtrace`
|
1025
|
-
#
|
1026
|
-
#
|
1045
|
+
# Argument `backtrace` might be used to modify the backtrace of the new
|
1046
|
+
# exception, as reported by Exception#backtrace and
|
1047
|
+
# Exception#backtrace_locations; the backtrace must be an array of
|
1048
|
+
# Thread::Backtrace::Location, an array of strings, a single string, or `nil`.
|
1049
|
+
#
|
1050
|
+
# Using the array of Thread::Backtrace::Location instances is the most
|
1051
|
+
# consistent option and should be preferred when possible. The necessary value
|
1052
|
+
# might be obtained from #caller_locations, or copied from
|
1053
|
+
# Exception#backtrace_locations of another error:
|
1027
1054
|
#
|
1028
1055
|
# begin
|
1029
|
-
#
|
1030
|
-
# rescue =>
|
1031
|
-
#
|
1056
|
+
# do_some_work()
|
1057
|
+
# rescue ZeroDivisionError => ex
|
1058
|
+
# raise(LogicalError, "You have an error in your math", ex.backtrace_locations)
|
1059
|
+
# end
|
1060
|
+
#
|
1061
|
+
# The ways, both Exception#backtrace and Exception#backtrace_locations of the
|
1062
|
+
# raised error are set to the same backtrace.
|
1063
|
+
#
|
1064
|
+
# When the desired stack of locations is not available and should be constructed
|
1065
|
+
# from scratch, an array of strings or a singular string can be used. In this
|
1066
|
+
# case, only Exception#backtrace is set:
|
1067
|
+
#
|
1068
|
+
# begin
|
1069
|
+
# raise(StandardError, 'Boom', %w[dsl.rb:3 framework.rb:1])
|
1070
|
+
# rescue => ex
|
1071
|
+
# p ex.backtrace
|
1072
|
+
# # => ["dsl.rb:3", "framework.rb:1"]
|
1073
|
+
# p ex.backtrace_locations
|
1074
|
+
# # => nil
|
1032
1075
|
# end
|
1033
|
-
# # => ["foo", "bar", "baz"]
|
1034
1076
|
#
|
1035
1077
|
# If argument `backtrace` is not given, the backtrace is set according to an
|
1036
1078
|
# array of Thread::Backtrace::Location objects, as derived from the call stack.
|
data/core/ractor.rbs
CHANGED
@@ -603,7 +603,7 @@ class Ractor
|
|
603
603
|
# }
|
604
604
|
# }.map(&:value).uniq.size #=> 1 and f() is called only once
|
605
605
|
#
|
606
|
-
def self.store_if_absent: (Symbol) { () ->
|
606
|
+
def self.store_if_absent: [A] (Symbol) { (nil) -> A } -> A
|
607
607
|
|
608
608
|
# <!--
|
609
609
|
# rdoc-file=ractor.rb
|
@@ -1053,6 +1053,9 @@ class Ractor
|
|
1053
1053
|
# end
|
1054
1054
|
#
|
1055
1055
|
class RemoteError < Ractor::Error
|
1056
|
+
# <!-- rdoc-file=ractor.rb -->
|
1057
|
+
# The Ractor an uncaught exception is raised in.
|
1058
|
+
#
|
1056
1059
|
def ractor: () -> Ractor
|
1057
1060
|
end
|
1058
1061
|
|
data/core/regexp.rbs
CHANGED
@@ -836,8 +836,10 @@
|
|
836
836
|
# These are also commonly used:
|
837
837
|
#
|
838
838
|
# * `/\p{Emoji}/`: Unicode emoji.
|
839
|
-
# * `/\p{Graph}/`:
|
840
|
-
#
|
839
|
+
# * `/\p{Graph}/`: Characters excluding `/\p{Cntrl}/` and `/\p{Space}/`. Note
|
840
|
+
# that invisible characters under the Unicode
|
841
|
+
# ["Format"](https://www.compart.com/en/unicode/category/Cf) category are
|
842
|
+
# included.
|
841
843
|
# * `/\p{Word}/`: A member in one of these Unicode character categories (see
|
842
844
|
# below) or having one of these Unicode properties:
|
843
845
|
#
|
data/core/ruby_vm.rbs
CHANGED
@@ -688,14 +688,14 @@ module RubyVM::YJIT
|
|
688
688
|
# Enable YJIT compilation. `stats` option decides whether to enable YJIT stats
|
689
689
|
# or not. `compilation_log` decides
|
690
690
|
# whether to enable YJIT compilation logging or not.
|
691
|
-
# `stats`:
|
692
|
-
#
|
693
|
-
#
|
694
|
-
#
|
695
|
-
# `log`:
|
696
|
-
#
|
697
|
-
#
|
698
|
-
#
|
691
|
+
# * `stats`:
|
692
|
+
# * `false`: Don't enable stats.
|
693
|
+
# * `true`: Enable stats. Print stats at exit.
|
694
|
+
# * `:quiet`: Enable stats. Do not print stats at exit.
|
695
|
+
# * `log`:
|
696
|
+
# * `false`: Don't enable the log.
|
697
|
+
# * `true`: Enable the log. Print log at exit.
|
698
|
+
# * `:quiet`: Enable the log. Do not print log at exit.
|
699
699
|
#
|
700
700
|
def self.enable: (?stats: false | true | :quiet) -> void
|
701
701
|
|
data/core/time.rbs
CHANGED
data/lib/rbs/version.rb
CHANGED
@@ -12,15 +12,17 @@
|
|
12
12
|
class Monitor
|
13
13
|
# <!--
|
14
14
|
# rdoc-file=ext/monitor/monitor.c
|
15
|
-
# - enter
|
15
|
+
# - enter -> nil
|
16
16
|
# -->
|
17
|
+
# Enters exclusive section.
|
17
18
|
#
|
18
19
|
def enter: () -> nil
|
19
20
|
|
20
21
|
# <!--
|
21
22
|
# rdoc-file=ext/monitor/monitor.c
|
22
|
-
# - exit
|
23
|
+
# - exit -> nil
|
23
24
|
# -->
|
25
|
+
# Leaves exclusive section.
|
24
26
|
#
|
25
27
|
def exit: () -> nil
|
26
28
|
|
@@ -77,20 +79,25 @@ class Monitor
|
|
77
79
|
# rdoc-file=ext/monitor/lib/monitor.rb
|
78
80
|
# - new_cond()
|
79
81
|
# -->
|
82
|
+
# Creates a new MonitorMixin::ConditionVariable associated with the Monitor
|
83
|
+
# object.
|
80
84
|
#
|
81
85
|
def new_cond: () -> ::MonitorMixin::ConditionVariable
|
82
86
|
|
83
87
|
# <!--
|
84
88
|
# rdoc-file=ext/monitor/monitor.c
|
85
|
-
# - synchronize
|
89
|
+
# - synchronize { } -> result of the block
|
86
90
|
# -->
|
91
|
+
# Enters exclusive section and executes the block. Leaves the exclusive section
|
92
|
+
# automatically when the block exits. See example under `MonitorMixin`.
|
87
93
|
#
|
88
94
|
def synchronize: [T] () { () -> T } -> T
|
89
95
|
|
90
96
|
# <!--
|
91
97
|
# rdoc-file=ext/monitor/monitor.c
|
92
|
-
# - try_enter
|
98
|
+
# - try_enter -> true or false
|
93
99
|
# -->
|
100
|
+
# Attempts to enter exclusive section. Returns `false` if lock fails.
|
94
101
|
#
|
95
102
|
def try_enter: () -> bool
|
96
103
|
|
@@ -279,6 +286,8 @@ module MonitorMixin
|
|
279
286
|
# rdoc-file=ext/monitor/lib/monitor.rb
|
280
287
|
# - mon_check_owner()
|
281
288
|
# -->
|
289
|
+
# Ensures that the MonitorMixin is owned by the current thread, otherwise raises
|
290
|
+
# an exception.
|
282
291
|
#
|
283
292
|
def mon_check_owner: () -> nil
|
284
293
|
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rbs
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.8.
|
4
|
+
version: 3.8.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Soutaro Matsumoto
|
8
8
|
bindir: exe
|
9
9
|
cert_chain: []
|
10
|
-
date: 2024-12-
|
10
|
+
date: 2024-12-27 00:00:00.000000000 Z
|
11
11
|
dependencies:
|
12
12
|
- !ruby/object:Gem::Dependency
|
13
13
|
name: logger
|