rbs 3.8.0.pre.1 → 3.8.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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 770c5cb7840fdbf9e30bccd590dec25f11f26f3db4355541f9ff87a5bf9cd8e7
4
- data.tar.gz: 7f250a6725b2c81a73b0ec7fc8749b55908fd1146dc4fc75a7c13dc71a4a525f
3
+ metadata.gz: 1b91cbfc2b983ede8389074430b54b2db70d1afee9c54c92cf8bc875568b7cf8
4
+ data.tar.gz: b0306b614ba8d61f78c78e91340615ee5a5b196d562eaac580c5f2fe66a29927
5
5
  SHA512:
6
- metadata.gz: ca4a6eb4ed52cf359a2b9caab1acde29ed974eb683a4662932d2410d5563478fa8741003d4da164ad0b176c6f760dafe3c81cd8fa8c5638361236211113c237e
7
- data.tar.gz: fe568c0f270726436ae1d343400ab0acd577ecb4e0032035ee8fc7d81aa880d2a86538a9bf8158255fb3171c7cd0a99b53457d5290fa04f7b158e249fc6263ec
6
+ metadata.gz: 78e9e035fccfc91fcdf4f37812e56c52d8dd9c4fd19211ad8c3ae1e9ddeda0c4deb3178b5b45e27863e93ebe415605bc83fd6d74ff2e13fc1ff266c82ab74059
7
+ data.tar.gz: 6e65f935e8e51b9542cfd8b2aab6a367949be17742764dbe0a65532e3a87f9fc1f1ce829eb67783bc7f7c711f8039b59a3e66ef24aeecb698def729908f96139
@@ -11,7 +11,7 @@ jobs:
11
11
  comments:
12
12
  runs-on: "ubuntu-latest"
13
13
  env:
14
- RUBY_COMMIT: v3_4_0_rc1
14
+ RUBY_COMMIT: 1b0c46daed9186b82ab4fef1a4ab225afe582ee6
15
15
  steps:
16
16
  - uses: actions/checkout@v4
17
17
  - uses: ruby/setup-ruby@v1
data/CHANGELOG.md CHANGED
@@ -1,5 +1,21 @@
1
1
  # CHANGELOG
2
2
 
3
+ ## 3.8.0 (2024-12-24)
4
+
5
+ ### Signature updates
6
+
7
+ * `Dir.mktmpdir` ([#2158](https://github.com/ruby/rbs/pull/2158))
8
+ * `File.join` ([#2158](https://github.com/ruby/rbs/pull/2158))
9
+ * `IO#each_line` ([#2151](https://github.com/ruby/rbs/pull/2151))
10
+ * `Kernel#readlines` ([#2151](https://github.com/ruby/rbs/pull/2151))
11
+ * `Ractor.store_if_absent` ([#2198](https://github.com/ruby/rbs/pull/2198))
12
+ * Update docs as of 2024-12-24, 16:13 JST ([#2193](https://github.com/ruby/rbs/pull/2193))
13
+
14
+ ### Library changes
15
+
16
+ * Adjust capacity of location children ([#2197](https://github.com/ruby/rbs/pull/2197))
17
+ * Should validate self-type on Proc ([#2192](https://github.com/ruby/rbs/pull/2192))
18
+
3
19
  ## 3.8.0.pre.1 (2024-12-19)
4
20
 
5
21
  ### Signature updates
data/core/array.rbs CHANGED
@@ -70,18 +70,20 @@
70
70
  #
71
71
  # You can create an Array object explicitly with:
72
72
  #
73
- # * An [array literal](rdoc-ref:literals.rdoc@Array+Literals):
73
+ # * An [array literal](rdoc-ref:syntax/literals.rdoc@Array+Literals):
74
74
  #
75
75
  # [1, 'one', :one, [2, 'two', :two]]
76
76
  #
77
- # * A [%w or %W: string-array
78
- # Literal](rdoc-ref:literals.rdoc@25w+and+-25W-3A+String-Array+Literals):
77
+ # * A [%w or %W string-array
78
+ # Literal](rdoc-ref:syntax/literals.rdoc@25w+and+-25W-3A+String-Array+Litera
79
+ # ls):
79
80
  #
80
81
  # %w[foo bar baz] # => ["foo", "bar", "baz"]
81
82
  # %w[1 % *] # => ["1", "%", "*"]
82
83
  #
83
- # * A [%i pr %I: symbol-array
84
- # Literal](rdoc-ref:literals.rdoc@25i+and+-25I-3A+Symbol-Array+Literals):
84
+ # * A [%i or %I symbol-array
85
+ # Literal](rdoc-ref:syntax/literals.rdoc@25i+and+-25I-3A+Symbol-Array+Litera
86
+ # ls):
85
87
  #
86
88
  # %i[foo bar baz] # => [:foo, :bar, :baz]
87
89
  # %i[1 % *] # => [:"1", :%, :*]
@@ -677,7 +679,7 @@ class Array[unchecked out Elem] < Object
677
679
  # When string argument `string_separator` is given, equivalent to
678
680
  # `self.join(string_separator)`:
679
681
  #
680
- # [0, [0, 1], {foo: 0}] * ', ' # => "0, 0, 1, {:foo=>0}"
682
+ # [0, [0, 1], {foo: 0}] * ', ' # => "0, 0, 1, {foo: 0}"
681
683
  #
682
684
  def *: (string str) -> ::String
683
685
  | (int int) -> ::Array[Elem]
@@ -1293,13 +1295,13 @@ class Array[unchecked out Elem] < Object
1293
1295
 
1294
1296
  # <!--
1295
1297
  # rdoc-file=array.c
1296
- # - combination(n) {|element| ... } -> self
1297
- # - combination(n) -> new_enumerator
1298
+ # - combination(count) {|element| ... } -> self
1299
+ # - combination(count) -> new_enumerator
1298
1300
  # -->
1299
1301
  # When a block and a positive [integer-convertible
1300
1302
  # object](rdoc-ref:implicit_conversion.rdoc@Integer-Convertible+Objects)
1301
- # argument `n` (`0 < n <= self.size`) are given, calls the block with all
1302
- # `n`-tuple combinations of `self`; returns `self`:
1303
+ # argument `count` (`0 < count <= self.size`) are given, calls the block with
1304
+ # each combination of `self` of size `count`; returns `self`:
1303
1305
  #
1304
1306
  # a = %w[a b c] # => ["a", "b", "c"]
1305
1307
  # a.combination(2) {|combination| p combination } # => ["a", "b", "c"]
@@ -1312,7 +1314,7 @@ class Array[unchecked out Elem] < Object
1312
1314
  #
1313
1315
  # The order of the yielded combinations is not guaranteed.
1314
1316
  #
1315
- # When `n` is zero, calls the block once with a new empty array:
1317
+ # When `count` is zero, calls the block once with a new empty array:
1316
1318
  #
1317
1319
  # a.combination(0) {|combination| p combination }
1318
1320
  # [].combination(0) {|combination| p combination }
@@ -1322,8 +1324,8 @@ class Array[unchecked out Elem] < Object
1322
1324
  # []
1323
1325
  # []
1324
1326
  #
1325
- # When `n` is negative or larger than `self.size` and `self` is non-empty, does
1326
- # not call the block:
1327
+ # When `count` is negative or larger than `self.size` and `self` is non-empty,
1328
+ # does not call the block:
1327
1329
  #
1328
1330
  # a.combination(-1) {|combination| fail 'Cannot happen' } # => ["a", "b", "c"]
1329
1331
  # a.combination(4) {|combination| fail 'Cannot happen' } # => ["a", "b", "c"]
@@ -1583,10 +1585,10 @@ class Array[unchecked out Elem] < Object
1583
1585
 
1584
1586
  # <!--
1585
1587
  # rdoc-file=array.c
1586
- # - drop(n) -> new_array
1588
+ # - drop(count) -> new_array
1587
1589
  # -->
1588
- # Returns a new array containing all but the first `n` element of `self`, where
1589
- # `n` is a non-negative Integer; does not modify `self`.
1590
+ # Returns a new array containing all but the first `count` element of `self`,
1591
+ # where `count` is a non-negative integer; does not modify `self`.
1590
1592
  #
1591
1593
  # Examples:
1592
1594
  #
@@ -1766,34 +1768,34 @@ class Array[unchecked out Elem] < Object
1766
1768
  # <!--
1767
1769
  # rdoc-file=array.rb
1768
1770
  # - fetch_values(*indexes) -> new_array
1769
- # - fetch_values(*indexes) {|index| ... } -> new_array
1771
+ # - fetch_values(*indexes) { |index| ... } -> new_array
1770
1772
  # -->
1771
1773
  # With no block given, returns a new array containing the elements of `self` at
1772
- # the offsets given by `indexes`; each of the `indexes` must be an
1774
+ # the offsets specified by `indexes`. Each of the `indexes` must be an
1773
1775
  # [integer-convertible
1774
1776
  # object](rdoc-ref:implicit_conversion.rdoc@Integer-Convertible+Objects):
1775
1777
  #
1776
1778
  # a = [:foo, :bar, :baz]
1777
- # a.fetch_values(3, 1) # => [:baz, :foo]
1778
- # a.fetch_values(3.1, 1) # => [:baz, :foo]
1779
+ # a.fetch_values(2, 0) # => [:baz, :foo]
1780
+ # a.fetch_values(2.1, 0) # => [:baz, :foo]
1779
1781
  # a.fetch_values # => []
1780
1782
  #
1781
1783
  # For a negative index, counts backwards from the end of the array:
1782
1784
  #
1783
- # a.fetch_values([-2, -1]) # [:bar, :baz]
1785
+ # a.fetch_values(-2, -1) # [:bar, :baz]
1784
1786
  #
1785
1787
  # When no block is given, raises an exception if any index is out of range.
1786
1788
  #
1787
1789
  # With a block given, for each index:
1788
1790
  #
1789
- # * If the index in in range, uses an element of `self` (as above).
1790
- # * Otherwise calls, the block with the index, and uses the block's return
1791
+ # * If the index is in range, uses an element of `self` (as above).
1792
+ # * Otherwise, calls the block with the index and uses the block's return
1791
1793
  # value.
1792
1794
  #
1793
1795
  # Example:
1794
1796
  #
1795
1797
  # a = [:foo, :bar, :baz]
1796
- # a.fetch_values(1, 0, 42, 777) {|index| index.to_s}
1798
+ # a.fetch_values(1, 0, 42, 777) { |index| index.to_s }
1797
1799
  # # => [:bar, :foo, "42", "777"]
1798
1800
  #
1799
1801
  # Related: see [Methods for Fetching](rdoc-ref:Array@Methods+for+Fetching).
@@ -2070,7 +2072,7 @@ class Array[unchecked out Elem] < Object
2070
2072
  #
2071
2073
  # [].first # => nil
2072
2074
  #
2073
- # With non-negative integer argument `count` given, returns the first `count`
2075
+ # With a non-negative integer argument `count` given, returns the first `count`
2074
2076
  # elements (as available) in a new array:
2075
2077
  #
2076
2078
  # a.first(0) # => []
@@ -2348,7 +2350,7 @@ class Array[unchecked out Elem] < Object
2348
2350
  # <!--
2349
2351
  # rdoc-file=array.rb
2350
2352
  # - last -> last_object or nil
2351
- # - last(n) -> new_array
2353
+ # - last(count) -> new_array
2352
2354
  # -->
2353
2355
  # Returns elements from `self`, or `nil`; `self` is not modified.
2354
2356
  #
@@ -2359,8 +2361,8 @@ class Array[unchecked out Elem] < Object
2359
2361
  # a # => [:foo, "bar", 2]
2360
2362
  # [].last # => nil
2361
2363
  #
2362
- # With non-negative integer argument `n` is given, returns a new array
2363
- # containing the trailing `n` elements of `self`, as available:
2364
+ # With non-negative integer argument `count` given, returns a new array
2365
+ # containing the trailing `count` elements of `self`, as available:
2364
2366
  #
2365
2367
  # a = [:foo, 'bar', 2]
2366
2368
  # a.last(2) # => ["bar", 2]
@@ -2419,9 +2421,9 @@ class Array[unchecked out Elem] < Object
2419
2421
  # <!--
2420
2422
  # rdoc-file=array.c
2421
2423
  # - max -> element
2422
- # - max(n) -> new_array
2424
+ # - max(count) -> new_array
2423
2425
  # - max {|a, b| ... } -> element
2424
- # - max(n) {|a, b| ... } -> new_array
2426
+ # - max(count) {|a, b| ... } -> new_array
2425
2427
  # -->
2426
2428
  # Returns one of the following:
2427
2429
  #
@@ -2438,8 +2440,8 @@ class Array[unchecked out Elem] < Object
2438
2440
  #
2439
2441
  # [1, 0, 3, 2].max # => 3
2440
2442
  #
2441
- # With non-negative numeric argument `n` and no block, returns a new array with
2442
- # at most `n` elements, in descending order, per method `#<=>`:
2443
+ # With non-negative numeric argument `count` and no block, returns a new array
2444
+ # with at most `count` elements, in descending order, per method `#<=>`:
2443
2445
  #
2444
2446
  # [1, 0, 3, 2].max(3) # => [3, 2, 1]
2445
2447
  # [1, 0, 3, 2].max(3.0) # => [3, 2, 1]
@@ -2454,8 +2456,8 @@ class Array[unchecked out Elem] < Object
2454
2456
  # ['0', '', '000', '00'].max {|a, b| a.size <=> b.size }
2455
2457
  # # => "000"
2456
2458
  #
2457
- # With non-negative numeric argument `n` and a block, returns a new array with
2458
- # at most `n` elements, in descending order, per the block:
2459
+ # With non-negative numeric argument `count` and a block, returns a new array
2460
+ # with at most `count` elements, in descending order, per the block:
2459
2461
  #
2460
2462
  # ['0', '', '000', '00'].max(2) {|a, b| a.size <=> b.size }
2461
2463
  # # => ["000", "00"]
@@ -2470,9 +2472,9 @@ class Array[unchecked out Elem] < Object
2470
2472
  # <!--
2471
2473
  # rdoc-file=array.c
2472
2474
  # - min -> element
2473
- # - min(n) -> new_array
2475
+ # - min(count) -> new_array
2474
2476
  # - min {|a, b| ... } -> element
2475
- # - min(n) {|a, b| ... } -> new_array
2477
+ # - min(count) {|a, b| ... } -> new_array
2476
2478
  # -->
2477
2479
  # Returns one of the following:
2478
2480
  #
@@ -2489,8 +2491,8 @@ class Array[unchecked out Elem] < Object
2489
2491
  #
2490
2492
  # [1, 0, 3, 2].min # => 0
2491
2493
  #
2492
- # With non-negative numeric argument `n` and no block, returns a new array with
2493
- # at most `n` elements, in ascending order, per method `#<=>`:
2494
+ # With non-negative numeric argument `count` and no block, returns a new array
2495
+ # with at most `count` elements, in ascending order, per method `#<=>`:
2494
2496
  #
2495
2497
  # [1, 0, 3, 2].min(3) # => [0, 1, 2]
2496
2498
  # [1, 0, 3, 2].min(3.0) # => [0, 1, 2]
@@ -2505,8 +2507,8 @@ class Array[unchecked out Elem] < Object
2505
2507
  # ['0', '', '000', '00'].min {|a, b| a.size <=> b.size }
2506
2508
  # # => ""
2507
2509
  #
2508
- # With non-negative numeric argument `n` and a block, returns a new array with
2509
- # at most `n` elements, in ascending order, per the block:
2510
+ # With non-negative numeric argument `count` and a block, returns a new array
2511
+ # with at most `count` elements, in ascending order, per the block:
2510
2512
  #
2511
2513
  # ['0', '', '000', '00'].min(2) {|a, b| a.size <=> b.size }
2512
2514
  # # => ["", "0"]
@@ -2623,15 +2625,15 @@ class Array[unchecked out Elem] < Object
2623
2625
 
2624
2626
  # <!--
2625
2627
  # rdoc-file=array.c
2626
- # - permutation(n = self.size) {|permutation| ... } -> self
2627
- # - permutation(n = self.size) -> new_enumerator
2628
+ # - permutation(count = self.size) {|permutation| ... } -> self
2629
+ # - permutation(count = self.size) -> new_enumerator
2628
2630
  # -->
2629
2631
  # Iterates over permutations of the elements of `self`; the order of
2630
2632
  # permutations is indeterminate.
2631
2633
  #
2632
- # With a block and an in-range positive integer argument `n` (`0 < n <=
2633
- # self.size`) given, calls the block with each `n`-tuple permutations of `self`;
2634
- # returns `self`:
2634
+ # With a block and an in-range positive integer argument `count` (`0 < count <=
2635
+ # self.size`) given, calls the block with each permutation of `self` of size
2636
+ # `count`; returns `self`:
2635
2637
  #
2636
2638
  # a = [0, 1, 2]
2637
2639
  # perms = []
@@ -2646,14 +2648,14 @@ class Array[unchecked out Elem] < Object
2646
2648
  # a.permutation(3) {|perm| perms.push(perm) }
2647
2649
  # perms # => [[0, 1, 2], [0, 2, 1], [1, 0, 2], [1, 2, 0], [2, 0, 1], [2, 1, 0]]
2648
2650
  #
2649
- # When `n` is zero, calls the block once with a new empty array:
2651
+ # When `count` is zero, calls the block once with a new empty array:
2650
2652
  #
2651
2653
  # perms = []
2652
2654
  # a.permutation(0) {|perm| perms.push(perm) }
2653
2655
  # perms # => [[]]
2654
2656
  #
2655
- # When `n` is out of range (negative or larger than `self.size`), does not call
2656
- # the block:
2657
+ # When `count` is out of range (negative or larger than `self.size`), does not
2658
+ # call the block:
2657
2659
  #
2658
2660
  # a.permutation(-1) {|permutation| fail 'Cannot happen' }
2659
2661
  # a.permutation(4) {|permutation| fail 'Cannot happen' }
@@ -3092,7 +3094,7 @@ class Array[unchecked out Elem] < Object
3092
3094
  # - sample(random: Random) -> object
3093
3095
  # - sample(count, random: Random) -> new_ary
3094
3096
  # -->
3095
- # Returns random elements from `self`, as selected by the object given by
3097
+ # Returns random elements from `self`, as selected by the object given by the
3096
3098
  # keyword argument `random`.
3097
3099
  #
3098
3100
  # With no argument `count` given, returns one random element from `self`:
@@ -3105,7 +3107,7 @@ class Array[unchecked out Elem] < Object
3105
3107
  #
3106
3108
  # [].sample # => nil
3107
3109
  #
3108
- # With non-negative numeric argument `count` given, returns a new array
3110
+ # With a non-negative numeric argument `count` given, returns a new array
3109
3111
  # containing `count` random elements from `self`:
3110
3112
  #
3111
3113
  # a.sample(3) # => [8, 9, 2]
@@ -3127,12 +3129,12 @@ class Array[unchecked out Elem] < Object
3127
3129
  #
3128
3130
  # a.sample(50) # => [6, 4, 1, 8, 5, 9, 0, 2, 3, 7]
3129
3131
  #
3130
- # The object given with keyword argument `random` is used as the random number
3131
- # generator:
3132
+ # The object given with the keyword argument `random` is used as the random
3133
+ # number generator:
3132
3134
  #
3133
3135
  # a = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]
3134
- # a.sample(random: Random.new(1)) #=> 6
3135
- # a.sample(4, random: Random.new(1)) #=> [6, 10, 9, 2]
3136
+ # a.sample(random: Random.new(1)) # => 6
3137
+ # a.sample(4, random: Random.new(1)) # => [6, 10, 9, 2]
3136
3138
  #
3137
3139
  # Related: see [Methods for Fetching](rdoc-ref:Array@Methods+for+Fetching).
3138
3140
  #
@@ -3229,7 +3231,7 @@ class Array[unchecked out Elem] < Object
3229
3231
  # - shuffle(random: Random) -> new_array
3230
3232
  # -->
3231
3233
  # Returns a new array containing all elements from `self` in a random order, as
3232
- # selected by the object given by keyword argument `random`:
3234
+ # selected by the object given by the keyword argument `random`:
3233
3235
  #
3234
3236
  # a = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
3235
3237
  # a.shuffle # => [0, 8, 1, 9, 6, 3, 4, 7, 2, 5]
@@ -3241,8 +3243,8 @@ class Array[unchecked out Elem] < Object
3241
3243
  # a.shuffle # => [1, 0, 1, 1, 0, 0, 1, 0, 0, 1]
3242
3244
  # a.shuffle # => [1, 1, 0, 0, 0, 1, 1, 0, 0, 1]
3243
3245
  #
3244
- # The object given with keyword argument `random` is used as the random number
3245
- # generator.
3246
+ # The object given with the keyword argument `random` is used as the random
3247
+ # number generator.
3246
3248
  #
3247
3249
  # Related: see [Methods for Fetching](rdoc-ref:Array@Methods+for+Fetching).
3248
3250
  #
@@ -3253,20 +3255,20 @@ class Array[unchecked out Elem] < Object
3253
3255
  # - shuffle!(random: Random) -> self
3254
3256
  # -->
3255
3257
  # Shuffles all elements in `self` into a random order, as selected by the object
3256
- # given by keyword argument `random`; returns `self`:
3258
+ # given by the keyword argument `random`. Returns `self`:
3257
3259
  #
3258
3260
  # a = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
3259
3261
  # a.shuffle! # => [5, 3, 8, 7, 6, 1, 9, 4, 2, 0]
3260
3262
  # a.shuffle! # => [9, 4, 0, 6, 2, 8, 1, 5, 3, 7]
3261
3263
  #
3262
- # Duplicate elements are included:
3264
+ # Duplicate elements are included:
3263
3265
  #
3264
3266
  # a = [0, 1, 0, 1, 0, 1, 0, 1, 0, 1]
3265
3267
  # a.shuffle! # => [1, 0, 0, 1, 1, 0, 1, 0, 0, 1]
3266
3268
  # a.shuffle! # => [0, 1, 0, 1, 1, 0, 1, 0, 1, 0]
3267
3269
  #
3268
- # The object given with keyword argument `random` is used as the random number
3269
- # generator.
3270
+ # The object given with the keyword argument `random` is used as the random
3271
+ # number generator.
3270
3272
  #
3271
3273
  # Related: see [Methods for Assigning](rdoc-ref:Array@Methods+for+Assigning).
3272
3274
  #
@@ -3922,7 +3924,7 @@ class Array[unchecked out Elem] < Object
3922
3924
  # <!--
3923
3925
  # rdoc-file=array.c
3924
3926
  # - zip(*other_arrays) -> new_array
3925
- # - zip(*other_arrays) {|other_array| ... } -> nil
3927
+ # - zip(*other_arrays) {|sub_array| ... } -> nil
3926
3928
  # -->
3927
3929
  # With no block given, combines `self` with the collection of `other_arrays`;
3928
3930
  # returns a new array of sub-arrays:
data/core/complex.rbs CHANGED
@@ -11,7 +11,7 @@
11
11
  #
12
12
  # You can create a Complex object from rectangular coordinates with:
13
13
  #
14
- # * A [complex literal](rdoc-ref:doc/syntax/literals.rdoc@Complex+Literals).
14
+ # * A [complex literal](rdoc-ref:syntax/literals.rdoc@Complex+Literals).
15
15
  # * Method Complex.rect.
16
16
  # * Method Kernel#Complex, either with numeric arguments or with certain
17
17
  # string arguments.
data/core/encoding.rbs CHANGED
@@ -1302,96 +1302,70 @@ class Encoding::Converter < Object
1302
1302
  end
1303
1303
 
1304
1304
  # <!-- rdoc-file=transcode.c -->
1305
- # AFTER_OUTPUT
1306
- #
1307
1305
  # Stop converting after some output is complete but before all of the input was
1308
1306
  # consumed. See primitive_convert for an example.
1309
1307
  #
1310
1308
  Encoding::Converter::AFTER_OUTPUT: Integer
1311
1309
 
1312
1310
  # <!-- rdoc-file=transcode.c -->
1313
- # CRLF_NEWLINE_DECORATOR
1314
- #
1315
1311
  # Decorator for converting LF to CRLF
1316
1312
  #
1317
1313
  Encoding::Converter::CRLF_NEWLINE_DECORATOR: Integer
1318
1314
 
1319
1315
  # <!-- rdoc-file=transcode.c -->
1320
- # CR_NEWLINE_DECORATOR
1321
- #
1322
1316
  # Decorator for converting LF to CR
1323
1317
  #
1324
1318
  Encoding::Converter::CR_NEWLINE_DECORATOR: Integer
1325
1319
 
1326
1320
  # <!-- rdoc-file=transcode.c -->
1327
- # INVALID_MASK
1328
- #
1329
1321
  # Mask for invalid byte sequences
1330
1322
  #
1331
1323
  Encoding::Converter::INVALID_MASK: Integer
1332
1324
 
1333
1325
  # <!-- rdoc-file=transcode.c -->
1334
- # INVALID_REPLACE
1335
- #
1336
1326
  # Replace invalid byte sequences
1337
1327
  #
1338
1328
  Encoding::Converter::INVALID_REPLACE: Integer
1339
1329
 
1340
1330
  # <!-- rdoc-file=transcode.c -->
1341
- # PARTIAL_INPUT
1342
- #
1343
1331
  # Indicates the source may be part of a larger string. See primitive_convert
1344
1332
  # for an example.
1345
1333
  #
1346
1334
  Encoding::Converter::PARTIAL_INPUT: Integer
1347
1335
 
1348
1336
  # <!-- rdoc-file=transcode.c -->
1349
- # UNDEF_HEX_CHARREF
1350
- #
1351
1337
  # Replace byte sequences that are undefined in the destination encoding with an
1352
1338
  # XML hexadecimal character reference. This is valid for XML conversion.
1353
1339
  #
1354
1340
  Encoding::Converter::UNDEF_HEX_CHARREF: Integer
1355
1341
 
1356
1342
  # <!-- rdoc-file=transcode.c -->
1357
- # UNDEF_MASK
1358
- #
1359
1343
  # Mask for a valid character in the source encoding but no related character(s)
1360
1344
  # in destination encoding.
1361
1345
  #
1362
1346
  Encoding::Converter::UNDEF_MASK: Integer
1363
1347
 
1364
1348
  # <!-- rdoc-file=transcode.c -->
1365
- # UNDEF_REPLACE
1366
- #
1367
1349
  # Replace byte sequences that are undefined in the destination encoding.
1368
1350
  #
1369
1351
  Encoding::Converter::UNDEF_REPLACE: Integer
1370
1352
 
1371
1353
  # <!-- rdoc-file=transcode.c -->
1372
- # UNIVERSAL_NEWLINE_DECORATOR
1373
- #
1374
1354
  # Decorator for converting CRLF and CR to LF
1375
1355
  #
1376
1356
  Encoding::Converter::UNIVERSAL_NEWLINE_DECORATOR: Integer
1377
1357
 
1378
1358
  # <!-- rdoc-file=transcode.c -->
1379
- # XML_ATTR_CONTENT_DECORATOR
1380
- #
1381
1359
  # Escape as XML AttValue
1382
1360
  #
1383
1361
  Encoding::Converter::XML_ATTR_CONTENT_DECORATOR: Integer
1384
1362
 
1385
1363
  # <!-- rdoc-file=transcode.c -->
1386
- # XML_ATTR_QUOTE_DECORATOR
1387
- #
1388
1364
  # Escape as XML AttValue
1389
1365
  #
1390
1366
  Encoding::Converter::XML_ATTR_QUOTE_DECORATOR: Integer
1391
1367
 
1392
1368
  # <!-- rdoc-file=transcode.c -->
1393
- # XML_TEXT_DECORATOR
1394
- #
1395
1369
  # Escape as XML CharData
1396
1370
  #
1397
1371
  Encoding::Converter::XML_TEXT_DECORATOR: Integer
data/core/errors.rbs CHANGED
@@ -188,6 +188,10 @@ end
188
188
  #
189
189
  # LoadError: no such file to load -- this/file/does/not/exist
190
190
  #
191
+ # <!-- rdoc-file=lib/bundled_gems.rb -->
192
+ # for RubyGems without Bundler environment. If loading library is not part of
193
+ # the default gems and the bundled gems, warn it.
194
+ #
191
195
  class LoadError < ScriptError
192
196
  # <!-- rdoc-file=error.c -->
193
197
  # the path that failed to load
data/core/exception.rbs CHANGED
@@ -19,7 +19,7 @@
19
19
  #
20
20
  # * NoMemoryError
21
21
  # * ScriptError
22
- # * [LoadError](https://docs.ruby-lang.org/en/master/LoadError.html)
22
+ # * LoadError
23
23
  # * NotImplementedError
24
24
  # * SyntaxError
25
25
  # * SecurityError
@@ -51,7 +51,7 @@
51
51
  # * ZeroDivisionError
52
52
  # * SystemExit
53
53
  # * SystemStackError
54
- # * [fatal](https://docs.ruby-lang.org/en/master/fatal.html)
54
+ # * [fatal](rdoc-ref:fatal)
55
55
  #
56
56
  class Exception
57
57
  # <!--
data/core/file.rbs CHANGED
@@ -1314,7 +1314,7 @@ class File < IO
1314
1314
  #
1315
1315
  # File.join("usr", "mail", "gumby") #=> "usr/mail/gumby"
1316
1316
  #
1317
- def self.join: (*string) -> String
1317
+ def self.join: (*path) -> String
1318
1318
 
1319
1319
  # <!--
1320
1320
  # rdoc-file=file.c
@@ -2295,43 +2295,36 @@ File::Constants::DSYNC: Integer
2295
2295
  File::Constants::EXCL: Integer
2296
2296
 
2297
2297
  # <!-- rdoc-file=dir.c -->
2298
- # FNM_CASEFOLD
2299
2298
  # [File::FNM_CASEFOLD](rdoc-ref:File::Constants@File-3A-3AFNM_CASEFOLD)
2300
2299
  #
2301
2300
  File::Constants::FNM_CASEFOLD: Integer
2302
2301
 
2303
2302
  # <!-- rdoc-file=dir.c -->
2304
- # FNM_DOTMATCH
2305
2303
  # [File::FNM_DOTMATCH](rdoc-ref:File::Constants@File-3A-3AFNM_DOTMATCH)
2306
2304
  #
2307
2305
  File::Constants::FNM_DOTMATCH: Integer
2308
2306
 
2309
2307
  # <!-- rdoc-file=dir.c -->
2310
- # FNM_EXTGLOB
2311
2308
  # [File::FNM_EXTGLOB](rdoc-ref:File::Constants@File-3A-3AFNM_EXTGLOB)
2312
2309
  #
2313
2310
  File::Constants::FNM_EXTGLOB: Integer
2314
2311
 
2315
2312
  # <!-- rdoc-file=dir.c -->
2316
- # FNM_NOESCAPE
2317
2313
  # [File::FNM_NOESCAPE](rdoc-ref:File::Constants@File-3A-3AFNM_NOESCAPE)
2318
2314
  #
2319
2315
  File::Constants::FNM_NOESCAPE: Integer
2320
2316
 
2321
2317
  # <!-- rdoc-file=dir.c -->
2322
- # FNM_PATHNAME
2323
2318
  # [File::FNM_PATHNAME](rdoc-ref:File::Constants@File-3A-3AFNM_PATHNAME)
2324
2319
  #
2325
2320
  File::Constants::FNM_PATHNAME: Integer
2326
2321
 
2327
2322
  # <!-- rdoc-file=dir.c -->
2328
- # FNM_SHORTNAME
2329
2323
  # [File::FNM_SHORTNAME](rdoc-ref:File::Constants@File-3A-3AFNM_SHORTNAME)
2330
2324
  #
2331
2325
  File::Constants::FNM_SHORTNAME: Integer
2332
2326
 
2333
2327
  # <!-- rdoc-file=dir.c -->
2334
- # FNM_SYSCASE
2335
2328
  # [File::FNM_SYSCASE](rdoc-ref:File::Constants@File-3A-3AFNM_SYSCASE)
2336
2329
  #
2337
2330
  File::Constants::FNM_SYSCASE: Integer
data/core/gc.rbs CHANGED
@@ -167,7 +167,8 @@ module GC
167
167
  # Configuration parameters are GC implementation-specific and may change without
168
168
  # notice.
169
169
  #
170
- # This method can be called without parameters to retrieve the current config.
170
+ # This method can be called without parameters to retrieve the current config as
171
+ # a `Hash` with `Symbol` keys.
171
172
  #
172
173
  # This method can also be called with a `Hash` argument to assign values to
173
174
  # valid config keys. Config keys missing from the passed `Hash` will be left
@@ -185,7 +186,24 @@ module GC
185
186
  #
186
187
  # This method is only expected to work on CRuby.
187
188
  #
188
- # Valid config keys for Ruby's default GC implementation are:
189
+ # ### GC Implementation independent values
190
+ #
191
+ # The `GC.config` hash can also contain keys that are global and read-only.
192
+ # These keys are not specific to any one GC library implementation and
193
+ # attempting to write to them will raise `ArgumentError`.
194
+ #
195
+ # There is currently only one global, read-only key:
196
+ #
197
+ # implementation
198
+ # : Returns a `String` containing the name of the currently loaded GC library,
199
+ # if one has been loaded using `RUBY_GC_LIBRARY`, and "default" in all other
200
+ # cases
201
+ #
202
+ #
203
+ # ### GC Implementation specific values
204
+ #
205
+ # GC libraries are expected to document their own configuration. Valid keys for
206
+ # Ruby's default GC implementation are:
189
207
  #
190
208
  # rgengc_allow_full_mark
191
209
  # : Controls whether the GC is allowed to run a full mark (young & old
data/core/hash.rbs CHANGED
@@ -1226,7 +1226,7 @@ class Hash[unchecked out K, unchecked out V] < Object
1226
1226
  # Returns a new String containing the hash entries:
1227
1227
  #
1228
1228
  # h = {foo: 0, bar: 1, baz: 2}
1229
- # h.inspect # => "{:foo=>0, :bar=>1, :baz=>2}"
1229
+ # h.inspect # => "{foo: 0, bar: 1, baz: 2}"
1230
1230
  #
1231
1231
  def inspect: () -> String
1232
1232
 
@@ -1628,7 +1628,7 @@ class Hash[unchecked out K, unchecked out V] < Object
1628
1628
  # Returns a new String containing the hash entries:
1629
1629
  #
1630
1630
  # h = {foo: 0, bar: 1, baz: 2}
1631
- # h.inspect # => "{:foo=>0, :bar=>1, :baz=>2}"
1631
+ # h.inspect # => "{foo: 0, bar: 1, baz: 2}"
1632
1632
  #
1633
1633
  alias to_s inspect
1634
1634
 
data/core/io.rbs CHANGED
@@ -3104,8 +3104,8 @@ class IO < Object
3104
3104
  #
3105
3105
  # Returns an Enumerator if no block is given.
3106
3106
  #
3107
- def each_line: (?String sep, ?Integer limit) { (String line) -> void } -> self
3108
- | (?String sep, ?Integer limit) -> ::Enumerator[String, self]
3107
+ def each_line: (?string sep, ?int limit, ?chomp: boolish) { (String line) -> void } -> self
3108
+ | (?string sep, ?int limit, ?chomp: boolish) -> ::Enumerator[String, self]
3109
3109
 
3110
3110
  # <!--
3111
3111
  # rdoc-file=io.c
data/core/kernel.rbs CHANGED
@@ -675,7 +675,7 @@ module Kernel : BasicObject
675
675
  #
676
676
  # String([0, 1, 2]) # => "[0, 1, 2]"
677
677
  # String(0..5) # => "0..5"
678
- # String({foo: 0, bar: 1}) # => "{:foo=>0, :bar=>1}"
678
+ # String({foo: 0, bar: 1}) # => "{foo: 0, bar: 1}"
679
679
  #
680
680
  # Raises `TypeError` if `object` cannot be converted to a string.
681
681
  #
@@ -1499,7 +1499,7 @@ module Kernel : BasicObject
1499
1499
  # Optional keyword arguments `enc_opts` specify encoding options; see [Encoding
1500
1500
  # options](rdoc-ref:encodings.rdoc@Encoding+Options).
1501
1501
  #
1502
- def self?.readlines: (?String arg0, ?Integer arg1) -> ::Array[String]
1502
+ def self?.readlines: (?string sep, ?int limit, ?chomp: boolish) -> ::Array[String]
1503
1503
 
1504
1504
  # <!--
1505
1505
  # rdoc-file=lib/rubygems/core_ext/kernel_require.rb