rbs 3.8.0.pre.1 → 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.
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}/`: Non-blank character (excludes spaces, control characters,
840
- # and similar).
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
  #
@@ -897,7 +899,7 @@
897
899
  # * [Nl, Letter_Number](https://www.compart.com/en/unicode/category/Nl).
898
900
  # * [No, Other_Number](https://www.compart.com/en/unicode/category/No).
899
901
  #
900
- # Punctation:
902
+ # Punctuation:
901
903
  #
902
904
  # * `P`, `Punctuation`: `Pc`, `Pd`, `Pe`, `Pf`, `Pi`, `Po`, or `Ps`.
903
905
  # * [Pc,
@@ -1603,7 +1605,7 @@ class Regexp
1603
1605
  # `self`:
1604
1606
  #
1605
1607
  # * Is a regexp literal; see [Regexp
1606
- # Literals](rdoc-ref:literals.rdoc@Regexp+Literals).
1608
+ # Literals](rdoc-ref:syntax/literals.rdoc@Regexp+Literals).
1607
1609
  # * Does not contain interpolations; see [Regexp
1608
1610
  # interpolation](rdoc-ref:Regexp@Interpolation+Mode).
1609
1611
  # * Is at the left of the expression.
data/core/ruby_vm.rbs CHANGED
@@ -591,7 +591,7 @@ module RubyVM::AbstractSyntaxTree
591
591
 
592
592
  # <!-- rdoc-file=ast.rb -->
593
593
  # RubyVM::AbstractSyntaxTree::Location instances are created by
594
- # RubyVM::AbstractSyntaxTree#locations.
594
+ # RubyVM::AbstractSyntaxTree::Node#locations.
595
595
  #
596
596
  # This class is MRI specific.
597
597
  #
@@ -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
- # * `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.
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
 
@@ -83,7 +83,9 @@
83
83
  #
84
84
  # ## License
85
85
  #
86
- # See [LICENSE.txt](rdoc-ref:lib/rubygems/LICENSE.txt) for permissions.
86
+ # See
87
+ # [LICENSE.txt](https://github.com/rubygems/rubygems/blob/master/LICENSE.txt)
88
+ # for permissions.
87
89
  #
88
90
  # Thanks!
89
91
  #
@@ -83,7 +83,9 @@
83
83
  #
84
84
  # ## License
85
85
  #
86
- # See [LICENSE.txt](rdoc-ref:lib/rubygems/LICENSE.txt) for permissions.
86
+ # See
87
+ # [LICENSE.txt](https://github.com/rubygems/rubygems/blob/master/LICENSE.txt)
88
+ # for permissions.
87
89
  #
88
90
  # Thanks!
89
91
  #
data/core/string.rbs CHANGED
@@ -16,12 +16,12 @@
16
16
  # * Method #String.
17
17
  #
18
18
  # Some `String` methods modify `self`. Typically, a method whose name ends with
19
- # `!` modifies `self` and returns `self`; often a similarly named method
19
+ # `!` modifies `self` and returns `self`; often, a similarly named method
20
20
  # (without the `!`) returns a new string.
21
21
  #
22
- # In general, if there exist both bang and non-bang version of method, the bang!
23
- # mutates and the non-bang! does not. However, a method without a bang can also
24
- # mutate, such as String#replace.
22
+ # In general, if both bang and non-bang versions of a method exist, the bang
23
+ # method mutates and the non-bang method does not. However, a method without a
24
+ # bang can also mutate, such as String#replace.
25
25
  #
26
26
  # ## Substitution Methods
27
27
  #
@@ -36,59 +36,58 @@
36
36
  #
37
37
  # Each of these methods takes:
38
38
  #
39
- # * A first argument, `pattern` (string or regexp), that specifies the
39
+ # * A first argument, `pattern` (String or Regexp), that specifies the
40
40
  # substring(s) to be replaced.
41
41
  #
42
- # * Either of these:
42
+ # * Either of the following:
43
43
  #
44
- # * A second argument, `replacement` (string or hash), that determines the
44
+ # * A second argument, `replacement` (String or Hash), that determines the
45
45
  # replacing string.
46
46
  # * A block that will determine the replacing string.
47
47
  #
48
- # The examples in this section mostly use methods String#sub and String#gsub;
49
- # the principles illustrated apply to all four substitution methods.
48
+ # The examples in this section mostly use the String#sub and String#gsub
49
+ # methods; the principles illustrated apply to all four substitution methods.
50
50
  #
51
51
  # **Argument `pattern`**
52
52
  #
53
53
  # Argument `pattern` is commonly a regular expression:
54
54
  #
55
55
  # s = 'hello'
56
- # s.sub(/[aeiou]/, '*')# => "h*llo"
56
+ # s.sub(/[aeiou]/, '*') # => "h*llo"
57
57
  # s.gsub(/[aeiou]/, '*') # => "h*ll*"
58
- # s.gsub(/[aeiou]/, '')# => "hll"
59
- # s.sub(/ell/, 'al') # => "halo"
60
- # s.gsub(/xyzzy/, '*') # => "hello"
58
+ # s.gsub(/[aeiou]/, '') # => "hll"
59
+ # s.sub(/ell/, 'al') # => "halo"
60
+ # s.gsub(/xyzzy/, '*') # => "hello"
61
61
  # 'THX1138'.gsub(/\d+/, '00') # => "THX00"
62
62
  #
63
63
  # When `pattern` is a string, all its characters are treated as ordinary
64
- # characters (not as regexp special characters):
64
+ # characters (not as Regexp special characters):
65
65
  #
66
66
  # 'THX1138'.gsub('\d+', '00') # => "THX1138"
67
67
  #
68
68
  # **`String` `replacement`**
69
69
  #
70
- # If `replacement` is a string, that string will determine the replacing string
71
- # that is to be substituted for the matched text.
70
+ # If `replacement` is a string, that string determines the replacing string that
71
+ # is substituted for the matched text.
72
72
  #
73
73
  # Each of the examples above uses a simple string as the replacing string.
74
74
  #
75
75
  # `String` `replacement` may contain back-references to the pattern's captures:
76
76
  #
77
- # * `\n` (*n* a non-negative integer) refers to `$n`.
77
+ # * `\n` (*n* is a non-negative integer) refers to `$n`.
78
78
  # * `\k<name>` refers to the named capture `name`.
79
79
  #
80
80
  # See Regexp for details.
81
81
  #
82
82
  # Note that within the string `replacement`, a character combination such as
83
- # `$&` is treated as ordinary text, and not as a special match variable.
84
- # However, you may refer to some special match variables using these
85
- # combinations:
83
+ # `$&` is treated as ordinary text, not as a special match variable. However,
84
+ # you may refer to some special match variables using these combinations:
86
85
  #
87
86
  # * `\&` and `\0` correspond to `$&`, which contains the complete matched
88
87
  # text.
89
- # * `\'` corresponds to `$'`, which contains string after match.
90
- # * `\`` corresponds to `$``, which contains string before match.
91
- # * `\+` corresponds to `$+`, which contains last capture group.
88
+ # * `\'` corresponds to `$'`, which contains the string after the match.
89
+ # * `\`` corresponds to `$``, which contains the string before the match.
90
+ # * `\+` corresponds to `$+`, which contains the last capture group.
92
91
  #
93
92
  # See Regexp for details.
94
93
  #
@@ -103,16 +102,16 @@
103
102
  # double-quoted string literal, you need to write `"..\\\\&.."`.
104
103
  #
105
104
  # If you want to write a non-back-reference string `\&` in `replacement`, you
106
- # need first to escape the backslash to prevent this method from interpreting it
105
+ # need to first escape the backslash to prevent this method from interpreting it
107
106
  # as a back-reference, and then you need to escape the backslashes again to
108
107
  # prevent a string literal from consuming them: `"..\\\\\\\\&.."`.
109
108
  #
110
- # You may want to use the block form to avoid a lot of backslashes.
109
+ # You may want to use the block form to avoid excessive backslashes.
111
110
  #
112
111
  # **\Hash `replacement`**
113
112
  #
114
- # If argument `replacement` is a hash, and `pattern` matches one of its keys,
115
- # the replacing string is the value for that key:
113
+ # If the argument `replacement` is a hash, and `pattern` matches one of its
114
+ # keys, the replacing string is the value for that key:
116
115
  #
117
116
  # h = {'foo' => 'bar', 'baz' => 'bat'}
118
117
  # 'food'.sub('foo', h) # => "bard"
@@ -127,15 +126,15 @@
127
126
  # In the block form, the current match string is passed to the block; the
128
127
  # block's return value becomes the replacing string:
129
128
  #
130
- # s = '@'
131
- # '1234'.gsub(/\d/) {|match| s.succ! } # => "ABCD"
129
+ # s = '@'
130
+ # '1234'.gsub(/\d/) { |match| s.succ! } # => "ABCD"
132
131
  #
133
132
  # Special match variables such as `$1`, `$2`, `$``, `$&`, and `$'` are set
134
133
  # appropriately.
135
134
  #
136
135
  # ## Whitespace in Strings
137
136
  #
138
- # In class `String`, *whitespace* is defined as a contiguous sequence of
137
+ # In the class `String`, *whitespace* is defined as a contiguous sequence of
139
138
  # characters consisting of any mixture of the following:
140
139
  #
141
140
  # * NL (null): `"\x00"`, `"\u0000"`.
@@ -146,50 +145,51 @@
146
145
  # * CR (carriage return): `"\x0d"`, `"\r"`.
147
146
  # * SP (space): `"\x20"`, `" "`.
148
147
  #
149
- # Whitespace is relevant for these methods:
148
+ # Whitespace is relevant for the following methods:
150
149
  #
151
- # * #lstrip, #lstrip!: strip leading whitespace.
152
- # * #rstrip, #rstrip!: strip trailing whitespace.
153
- # * #strip, #strip!: strip leading and trailing whitespace.
150
+ # * #lstrip, #lstrip!: Strip leading whitespace.
151
+ # * #rstrip, #rstrip!: Strip trailing whitespace.
152
+ # * #strip, #strip!: Strip leading and trailing whitespace.
154
153
  #
155
154
  # ## `String` Slices
156
155
  #
157
- # A *slice* of a string is a substring that is selected by certain criteria.
156
+ # A *slice* of a string is a substring selected by certain criteria.
158
157
  #
159
- # These instance methods make use of slicing:
158
+ # These instance methods utilize slicing:
160
159
  #
161
- # * String#[] (aliased as String#slice): returns a slice copied from `self`.
162
- # * String#[]=: returns a copy of `self` with a slice replaced.
163
- # * String#slice!: returns `self` with a slice removed.
160
+ # * String#[] (aliased as String#slice): Returns a slice copied from `self`.
161
+ # * String#[]=: Mutates `self` with the slice replaced.
162
+ # * String#slice!: Mutates `self` with the slice removed and returns the
163
+ # removed slice.
164
164
  #
165
165
  # Each of the above methods takes arguments that determine the slice to be
166
166
  # copied or replaced.
167
167
  #
168
- # The arguments have several forms. For string `string`, the forms are:
168
+ # The arguments have several forms. For a string `string`, the forms are:
169
169
  #
170
- # * `string[index]`.
171
- # * `string[start, length]`.
172
- # * `string[range]`.
173
- # * `string[regexp, capture = 0]`.
174
- # * `string[substring]`.
170
+ # * `string[index]`
171
+ # * `string[start, length]`
172
+ # * `string[range]`
173
+ # * `string[regexp, capture = 0]`
174
+ # * `string[substring]`
175
175
  #
176
176
  # **`string[index]`**
177
177
  #
178
- # When non-negative integer argument `index` is given, the slice is the
178
+ # When a non-negative integer argument `index` is given, the slice is the
179
179
  # 1-character substring found in `self` at character offset `index`:
180
180
  #
181
- # 'bar'[0] # => "b"
182
- # 'bar'[2] # => "r"
183
- # 'bar'[20] # => nil
184
- # 'тест'[2] # => "с"
185
- # 'こんにちは'[4] # => "は"
181
+ # 'bar'[0] # => "b"
182
+ # 'bar'[2] # => "r"
183
+ # 'bar'[20] # => nil
184
+ # 'тест'[2] # => "с"
185
+ # 'こんにちは'[4] # => "は"
186
186
  #
187
- # When negative integer `index` is given, the slice begins at the offset given
187
+ # When a negative integer `index` is given, the slice begins at the offset given
188
188
  # by counting backward from the end of `self`:
189
189
  #
190
- # 'bar'[-3] # => "b"
191
- # 'bar'[-1] # => "r"
192
- # 'bar'[-20] # => nil
190
+ # 'bar'[-3] # => "b"
191
+ # 'bar'[-1] # => "r"
192
+ # 'bar'[-20] # => nil
193
193
  #
194
194
  # **`string[start, length]`**
195
195
  #
@@ -197,92 +197,92 @@
197
197
  # begins at character offset `start`, if it exists, and continues for `length`
198
198
  # characters, if available:
199
199
  #
200
- # 'foo'[0, 2] # => "fo"
201
- # 'тест'[1, 2] # => "ес"
202
- # 'こんにちは'[2, 2] # => "にち"
200
+ # 'foo'[0, 2] # => "fo"
201
+ # 'тест'[1, 2] # => "ес"
202
+ # 'こんにちは'[2, 2] # => "にち"
203
203
  # # Zero length.
204
- # 'foo'[2, 0] # => ""
204
+ # 'foo'[2, 0] # => ""
205
205
  # # Length not entirely available.
206
- # 'foo'[1, 200] # => "oo"
206
+ # 'foo'[1, 200] # => "oo"
207
207
  # # Start out of range.
208
208
  # 'foo'[4, 2] # => nil
209
209
  #
210
- # Special case: if `start` is equal to the length of `self`, the slice is a new
211
- # empty string:
210
+ # Special case: if `start` equals the length of `self`, the slice is a new empty
211
+ # string:
212
212
  #
213
- # 'foo'[3, 2] # => ""
214
- # 'foo'[3, 200] # => ""
213
+ # 'foo'[3, 2] # => ""
214
+ # 'foo'[3, 200] # => ""
215
215
  #
216
- # When negative `start` and non-negative `length` are given, the slice beginning
217
- # is determined by counting backward from the end of `self`, and the slice
218
- # continues for `length` characters, if available:
216
+ # When a negative `start` and non-negative `length` are given, the slice begins
217
+ # by counting backward from the end of `self`, and continues for `length`
218
+ # characters, if available:
219
219
  #
220
- # 'foo'[-2, 2] # => "oo"
221
- # 'foo'[-2, 200] # => "oo"
220
+ # 'foo'[-2, 2] # => "oo"
221
+ # 'foo'[-2, 200] # => "oo"
222
222
  # # Start out of range.
223
223
  # 'foo'[-4, 2] # => nil
224
224
  #
225
- # When negative `length` is given, there is no slice:
225
+ # When a negative `length` is given, there is no slice:
226
226
  #
227
- # 'foo'[1, -1] # => nil
228
- # 'foo'[-2, -1] # => nil
227
+ # 'foo'[1, -1] # => nil
228
+ # 'foo'[-2, -1] # => nil
229
229
  #
230
230
  # **`string[range]`**
231
231
  #
232
- # When Range argument `range` is given, creates a substring of `string` using
233
- # the indices in `range`. The slice is then determined as above:
232
+ # When a Range argument `range` is given, it creates a substring of `string`
233
+ # using the indices in `range`. The slice is then determined as above:
234
234
  #
235
- # 'foo'[0..1] # => "fo"
236
- # 'foo'[0, 2] # => "fo"
235
+ # 'foo'[0..1] # => "fo"
236
+ # 'foo'[0, 2] # => "fo"
237
237
  #
238
- # 'foo'[2...2] # => ""
239
- # 'foo'[2, 0] # => ""
238
+ # 'foo'[2...2] # => ""
239
+ # 'foo'[2, 0] # => ""
240
240
  #
241
- # 'foo'[1..200] # => "oo"
242
- # 'foo'[1, 200] # => "oo"
241
+ # 'foo'[1..200] # => "oo"
242
+ # 'foo'[1, 200] # => "oo"
243
243
  #
244
- # 'foo'[4..5] # => nil
245
- # 'foo'[4, 2] # => nil
244
+ # 'foo'[4..5] # => nil
245
+ # 'foo'[4, 2] # => nil
246
246
  #
247
- # 'foo'[-4..-3] # => nil
248
- # 'foo'[-4, 2] # => nil
247
+ # 'foo'[-4..-3] # => nil
248
+ # 'foo'[-4, 2] # => nil
249
249
  #
250
- # 'foo'[3..4] # => ""
251
- # 'foo'[3, 2] # => ""
250
+ # 'foo'[3..4] # => ""
251
+ # 'foo'[3, 2] # => ""
252
252
  #
253
- # 'foo'[-2..-1] # => "oo"
254
- # 'foo'[-2, 2] # => "oo"
253
+ # 'foo'[-2..-1] # => "oo"
254
+ # 'foo'[-2, 2] # => "oo"
255
255
  #
256
- # 'foo'[-2..197] # => "oo"
257
- # 'foo'[-2, 200] # => "oo"
256
+ # 'foo'[-2..197] # => "oo"
257
+ # 'foo'[-2, 200] # => "oo"
258
258
  #
259
259
  # **`string[regexp, capture = 0]`**
260
260
  #
261
261
  # When the Regexp argument `regexp` is given, and the `capture` argument is `0`,
262
262
  # the slice is the first matching substring found in `self`:
263
263
  #
264
- # 'foo'[/o/] # => "o"
265
- # 'foo'[/x/] # => nil
264
+ # 'foo'[/o/] # => "o"
265
+ # 'foo'[/x/] # => nil
266
266
  # s = 'hello there'
267
- # s[/[aeiou](.)\1/] # => "ell"
268
- # s[/[aeiou](.)\1/, 0] # => "ell"
267
+ # s[/[aeiou](.)\1/] # => "ell"
268
+ # s[/[aeiou](.)\1/, 0] # => "ell"
269
269
  #
270
- # If argument `capture` is given and not `0`, it should be either an capture
271
- # group index (integer) or a capture group name (string or symbol); the slice is
272
- # the specified capture (see Regexp@Groups+and+Captures):
270
+ # If the argument `capture` is provided and not `0`, it should be either a
271
+ # capture group index (integer) or a capture group name (String or Symbol); the
272
+ # slice is the specified capture (see Regexp@Groups and Captures):
273
273
  #
274
274
  # s = 'hello there'
275
275
  # s[/[aeiou](.)\1/, 1] # => "l"
276
276
  # s[/(?<vowel>[aeiou])(?<non_vowel>[^aeiou])/, "non_vowel"] # => "l"
277
- # s[/(?<vowel>[aeiou])(?<non_vowel>[^aeiou])/, :vowel] # => "e"
277
+ # s[/(?<vowel>[aeiou])(?<non_vowel>[^aeiou])/, :vowel] # => "e"
278
278
  #
279
279
  # If an invalid capture group index is given, there is no slice. If an invalid
280
280
  # capture group name is given, `IndexError` is raised.
281
281
  #
282
282
  # **`string[substring]`**
283
283
  #
284
- # When the single `String` argument `substring` is given, returns the substring
285
- # from `self` if found, otherwise `nil`:
284
+ # When the single `String` argument `substring` is given, it returns the
285
+ # substring from `self` if found, otherwise `nil`:
286
286
  #
287
287
  # 'foo'['oo'] # => "oo"
288
288
  # 'foo'['xx'] # => nil
@@ -291,8 +291,8 @@
291
291
  #
292
292
  # First, what's elsewhere. Class `String`:
293
293
  #
294
- # * Inherits from [class Object](rdoc-ref:Object@What-27s+Here).
295
- # * Includes [module Comparable](rdoc-ref:Comparable@What-27s+Here).
294
+ # * Inherits from the [Object class](rdoc-ref:Object@What-27s+Here).
295
+ # * Includes the [Comparable module](rdoc-ref:Comparable@What-27s+Here).
296
296
  #
297
297
  # Here, class `String` provides methods that are useful for:
298
298
  #
@@ -315,11 +315,11 @@
315
315
  #
316
316
  # ### Methods for a Frozen/Unfrozen String
317
317
  #
318
- # * #+@: Returns a string that is not frozen: `self`, if not frozen;
319
- # `self.dup` otherwise.
320
- # * #-@ (aliased as #dedup): Returns a string that is frozen: `self`, if
318
+ # * #+@: Returns a string that is not frozen: `self` if not frozen; `self.dup`
319
+ # otherwise.
320
+ # * #-@ (aliased as #dedup): Returns a string that is frozen: `self` if
321
321
  # already frozen; `self.freeze` otherwise.
322
- # * #freeze: Freezes `self`, if not already frozen; returns `self`.
322
+ # * #freeze: Freezes `self` if not already frozen; returns `self`.
323
323
  #
324
324
  # ### Methods for Querying
325
325
  #
@@ -384,7 +384,8 @@
384
384
  #
385
385
  # *Insertion*
386
386
  #
387
- # * #insert: Returns `self` with a given string inserted at a given offset.
387
+ # * #insert: Returns `self` with a given string inserted at a specified
388
+ # offset.
388
389
  # * #<<: Returns `self` concatenated with a given string or integer.
389
390
  # * #append_as_bytes: Returns `self` concatenated with strings without
390
391
  # performing any encoding validation or conversion.
@@ -421,8 +422,8 @@
421
422
  #
422
423
  # *Encoding*
423
424
  #
424
- # * #encode!: Returns `self` with all characters transcoded from one given
425
- # encoding into another.
425
+ # * #encode!: Returns `self` with all characters transcoded from one encoding
426
+ # to another.
426
427
  # * #unicode_normalize!: Unicode-normalizes `self`; returns `self`.
427
428
  # * #scrub!: Replaces each invalid byte with a given character; returns
428
429
  # `self`.
@@ -442,8 +443,8 @@
442
443
  # `nil` otherwise.
443
444
  # * #strip!: Removes leading and trailing whitespace; returns `self` if any
444
445
  # changes, `nil` otherwise.
445
- # * #chomp!: Removes trailing record separator, if found; returns `self` if
446
- # any changes, `nil` otherwise.
446
+ # * #chomp!: Removes the trailing record separator, if found; returns `self`
447
+ # if any changes, `nil` otherwise.
447
448
  # * #chop!: Removes trailing newline characters if found; otherwise removes
448
449
  # the last character; returns `self` if any changes, `nil` otherwise.
449
450
  #
@@ -454,9 +455,9 @@
454
455
  #
455
456
  # *Extension*
456
457
  #
457
- # * #*: Returns the concatenation of multiple copies of `self`,
458
+ # * #*: Returns the concatenation of multiple copies of `self`.
458
459
  # * #+: Returns the concatenation of `self` and a given other string.
459
- # * #center: Returns a copy of `self` centered between pad substring.
460
+ # * #center: Returns a copy of `self` centered between pad substrings.
460
461
  # * #concat: Returns the concatenation of `self` with given other strings.
461
462
  # * #prepend: Returns the concatenation of a given other string with `self`.
462
463
  # * #ljust: Returns a copy of `self` of a given length, right-padded with a
@@ -472,28 +473,28 @@
472
473
  # * #unicode_normalize: Returns a copy of `self` with each character
473
474
  # Unicode-normalized.
474
475
  # * #encode: Returns a copy of `self` with all characters transcoded from one
475
- # given encoding into another.
476
+ # encoding to another.
476
477
  #
477
478
  # *Substitution*
478
479
  #
479
480
  # * #dump: Returns a copy of `self` with all non-printing characters replaced
480
481
  # by xHH notation and all special characters escaped.
481
- # * #undump: Returns a copy of `self` with all `\xNN` notation replace by
482
- # `\uNNNN` notation and all escaped characters unescaped.
482
+ # * #undump: Returns a copy of `self` with all `\xNN` notations replaced by
483
+ # `\uNNNN` notations and all escaped characters unescaped.
483
484
  # * #sub: Returns a copy of `self` with the first substring matching a given
484
- # pattern replaced with a given replacement string;.
485
+ # pattern replaced with a given replacement string.
485
486
  # * #gsub: Returns a copy of `self` with each substring that matches a given
486
487
  # pattern replaced with a given replacement string.
487
488
  # * #succ (aliased as #next): Returns the string that is the successor to
488
489
  # `self`.
489
490
  # * #reverse: Returns a copy of `self` with its characters in reverse order.
490
491
  # * #tr: Returns a copy of `self` with specified characters replaced with
491
- # specified replacement characters.
492
+ # specified replacement characters.
492
493
  # * #tr_s: Returns a copy of `self` with specified characters replaced with
493
494
  # specified replacement characters, removing duplicates from the substrings
494
495
  # that were modified.
495
496
  # * #%: Returns the string resulting from formatting a given object into
496
- # `self`
497
+ # `self`.
497
498
  #
498
499
  # *Casing*
499
500
  #
@@ -506,7 +507,7 @@
506
507
  #
507
508
  # *Deletion*
508
509
  #
509
- # * #delete: Returns a copy of `self` with characters removed
510
+ # * #delete: Returns a copy of `self` with characters removed.
510
511
  # * #delete_prefix: Returns a copy of `self` with a given prefix removed.
511
512
  # * #delete_suffix: Returns a copy of `self` with a given suffix removed.
512
513
  # * #lstrip: Returns a copy of `self` with leading whitespace removed.
@@ -520,7 +521,7 @@
520
521
  # * #squeeze: Returns a copy of `self` with contiguous duplicate characters
521
522
  # removed.
522
523
  # * #[] (aliased as #slice): Returns a substring determined by a given index,
523
- # start/length, or range, or string.
524
+ # start/length, range, regexp, or string.
524
525
  # * #byteslice: Returns a substring determined by a given index, start/length,
525
526
  # or range.
526
527
  # * #chr: Returns the first character.
@@ -539,7 +540,7 @@
539
540
  # * #bytes: Returns an array of the bytes in `self`.
540
541
  # * #chars: Returns an array of the characters in `self`.
541
542
  # * #codepoints: Returns an array of the integer ordinals in `self`.
542
- # * #getbyte: Returns an integer byte as determined by a given index.
543
+ # * #getbyte: Returns the integer byte at the given index in `self`.
543
544
  # * #grapheme_clusters: Returns an array of the grapheme clusters in `self`.
544
545
  #
545
546
  # *Splitting*
@@ -547,17 +548,17 @@
547
548
  # * #lines: Returns an array of the lines in `self`, as determined by a given
548
549
  # record separator.
549
550
  # * #partition: Returns a 3-element array determined by the first substring
550
- # that matches a given substring or regexp,
551
+ # that matches a given substring or regexp.
551
552
  # * #rpartition: Returns a 3-element array determined by the last substring
552
- # that matches a given substring or regexp,
553
+ # that matches a given substring or regexp.
553
554
  # * #split: Returns an array of substrings determined by a given delimiter --
554
- # regexp or string -- or, if a block given, passes those substrings to the
555
- # block.
555
+ # regexp or string -- or, if a block is given, passes those substrings to
556
+ # the block.
556
557
  #
557
558
  # *Matching*
558
559
  #
559
560
  # * #scan: Returns an array of substrings matching a given regexp or string,
560
- # or, if a block given, passes each matching substring to the block.
561
+ # or, if a block is given, passes each matching substring to the block.
561
562
  # * #unpack: Returns an array of substrings extracted from `self` according to
562
563
  # a given format.
563
564
  # * #unpack1: Returns the first substring extracted from `self` according to a
@@ -577,8 +578,8 @@
577
578
  #
578
579
  # *Strings and Symbols*
579
580
  #
580
- # * #inspect: Returns copy of `self`, enclosed in double-quotes, with special
581
- # characters escaped.
581
+ # * #inspect: Returns a copy of `self`, enclosed in double quotes, with
582
+ # special characters escaped.
582
583
  # * #intern (aliased as #to_sym): Returns the symbol corresponding to `self`.
583
584
  #
584
585
  # ### Methods for Iterating
@@ -734,7 +735,8 @@ class String
734
735
  # rdoc-file=string.c
735
736
  # - +string -> new_string or self
736
737
  # -->
737
- # Returns `self` if `self` is not frozen.
738
+ # Returns `self` if `self` is not frozen and can be mutated without warning
739
+ # issuance.
738
740
  #
739
741
  # Otherwise returns `self.dup`, which is not frozen.
740
742
  #
data/core/time.rbs CHANGED
@@ -331,6 +331,10 @@
331
331
  # keyword argument `in:`, and when Time#getlocal or Time#localtime is called
332
332
  # with `tz` as the value for positional argument `zone`.
333
333
  #
334
+ # The UTC offset will be calculated as the difference between the original
335
+ # time and the returned object as an `Integer`. If the object is in fixed
336
+ # offset, its `utc_offset` is also counted.
337
+ #
334
338
  # Argument
335
339
  # : a [Time-like object](rdoc-ref:Time@Time-Like+Objects).
336
340
  #
@@ -1625,7 +1629,7 @@ class Time < Object
1625
1629
  #
1626
1630
  # You must require 'time' to use this method.
1627
1631
  #
1628
- def xmlschema: () -> String
1632
+ def xmlschema: (?Integer fraction_digits) -> String
1629
1633
 
1630
1634
  # <!--
1631
1635
  # rdoc-file=time.c