optimistic-json 0.1.1 → 0.1.3

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 (60) hide show
  1. checksums.yaml +4 -4
  2. data/.rubocop.yml +6 -0
  3. data/.ruby-version +1 -0
  4. data/CHANGELOG.md +10 -0
  5. data/README.md +4 -0
  6. data/Rakefile +5 -1
  7. data/lib/optimistic/json/parser.rb +28 -7
  8. data/lib/optimistic/json/version.rb +2 -1
  9. data/lib/optimistic/json.rb +1 -1
  10. data/sorbet/config +4 -0
  11. data/sorbet/rbi/annotations/.gitattributes +1 -0
  12. data/sorbet/rbi/annotations/rainbow.rbi +269 -0
  13. data/sorbet/rbi/gems/.gitattributes +1 -0
  14. data/sorbet/rbi/gems/ast@2.4.2.rbi +550 -0
  15. data/sorbet/rbi/gems/benchmark@0.5.0.rbi +621 -0
  16. data/sorbet/rbi/gems/diff-lcs@1.5.0.rbi +1068 -0
  17. data/sorbet/rbi/gems/erubi@1.13.1.rbi +155 -0
  18. data/sorbet/rbi/gems/gem-release@2.2.2.rbi +1335 -0
  19. data/sorbet/rbi/gems/io-console@0.6.0.rbi +9 -0
  20. data/sorbet/rbi/gems/json@2.7.0.rbi +1797 -0
  21. data/sorbet/rbi/gems/language_server-protocol@3.17.0.3.rbi +12986 -0
  22. data/sorbet/rbi/gems/logger@1.6.0.rbi +845 -0
  23. data/sorbet/rbi/gems/multi_json@1.15.0.rbi +218 -0
  24. data/sorbet/rbi/gems/netrc@0.11.0.rbi +147 -0
  25. data/sorbet/rbi/gems/parallel@1.28.0.rbi +270 -0
  26. data/sorbet/rbi/gems/parser@3.2.2.4.rbi +5154 -0
  27. data/sorbet/rbi/gems/prism@1.9.0.rbi +42224 -0
  28. data/sorbet/rbi/gems/psych@5.1.1.1.rbi +2321 -0
  29. data/sorbet/rbi/gems/racc@1.7.3.rbi +169 -0
  30. data/sorbet/rbi/gems/rainbow@3.1.1.rbi +362 -0
  31. data/sorbet/rbi/gems/rake@13.1.0.rbi +3025 -0
  32. data/sorbet/rbi/gems/rbi@0.3.11.rbi +5505 -0
  33. data/sorbet/rbi/gems/rbs@4.0.2.rbi +6908 -0
  34. data/sorbet/rbi/gems/rdoc@6.6.0.rbi +9 -0
  35. data/sorbet/rbi/gems/regexp_parser@2.8.2.rbi +3268 -0
  36. data/sorbet/rbi/gems/reline@0.4.1.rbi +9 -0
  37. data/sorbet/rbi/gems/require-hooks@0.4.0.rbi +152 -0
  38. data/sorbet/rbi/gems/rexml@3.2.6.rbi +4798 -0
  39. data/sorbet/rbi/gems/rspec-core@3.12.2.rbi +9405 -0
  40. data/sorbet/rbi/gems/rspec-expectations@3.12.3.rbi +6013 -0
  41. data/sorbet/rbi/gems/rspec-mocks@3.12.6.rbi +4750 -0
  42. data/sorbet/rbi/gems/rspec-support@3.12.1.rbi +1261 -0
  43. data/sorbet/rbi/gems/rspec@3.12.0.rbi +15 -0
  44. data/sorbet/rbi/gems/rubocop-ast@1.30.0.rbi +6750 -0
  45. data/sorbet/rbi/gems/rubocop-capybara@2.19.0.rbi +1058 -0
  46. data/sorbet/rbi/gems/rubocop-factory_bot@2.24.0.rbi +875 -0
  47. data/sorbet/rbi/gems/rubocop-rspec@2.25.0.rbi +7696 -0
  48. data/sorbet/rbi/gems/rubocop@1.58.0.rbi +53790 -0
  49. data/sorbet/rbi/gems/ruby-progressbar@1.13.0.rbi +988 -0
  50. data/sorbet/rbi/gems/rubydex@0.2.3.rbi +787 -0
  51. data/sorbet/rbi/gems/spoom@1.7.14.rbi +6151 -0
  52. data/sorbet/rbi/gems/stringio@3.1.0.rbi +9 -0
  53. data/sorbet/rbi/gems/tapioca@0.19.1.rbi +3558 -0
  54. data/sorbet/rbi/gems/thor@1.5.0.rbi +3870 -0
  55. data/sorbet/rbi/gems/tsort@0.2.0.rbi +387 -0
  56. data/sorbet/rbi/gems/unicode-display_width@2.5.0.rbi +64 -0
  57. data/sorbet/tapioca/config.yml +13 -0
  58. data/sorbet/tapioca/require.rb +4 -0
  59. metadata +55 -23
  60. data/sig/optimistic/json.rbs +0 -6
@@ -0,0 +1,1261 @@
1
+ # typed: true
2
+
3
+ # DO NOT EDIT MANUALLY
4
+ # This is an autogenerated file for types exported from the `rspec-support` gem.
5
+ # Please instead update this file by running `bin/tapioca gem rspec-support`.
6
+
7
+
8
+ # pkg:gem/rspec-support#lib/rspec/support.rb:1
9
+ module RSpec
10
+ extend ::RSpec::Support::Warnings
11
+ end
12
+
13
+ # Consistent implementation for "cleaning" the caller method to strip out
14
+ # non-rspec lines. This enables errors to be reported at the call site in
15
+ # the code using the library, which is far more useful than the particular
16
+ # internal method that raised an error.
17
+ #
18
+ # pkg:gem/rspec-support#lib/rspec/support/caller_filter.rb:8
19
+ class RSpec::CallerFilter
20
+ class << self
21
+ # This supports args because it's more efficient when the caller specifies
22
+ # these. It allows us to skip frames the caller knows are part of RSpec,
23
+ # and to decrease the increment size if the caller is confident the line will
24
+ # be found in a small number of stack frames from `skip_frames`.
25
+ #
26
+ # Note that there is a risk to passing a `skip_frames` value that is too high:
27
+ # If it skipped the first non-rspec line, then this method would return the
28
+ # 2nd or 3rd (or whatever) non-rspec line. Thus, you generally shouldn't pass
29
+ # values for these parameters, particularly since most places that use this are
30
+ # not hot spots (generally it gets used for deprecation warnings). However,
31
+ # if you do have a hot spot that calls this, passing `skip_frames` can make
32
+ # a significant difference. Just make sure that that particular use is tested
33
+ # so that if the provided `skip_frames` changes to no longer be accurate in
34
+ # such a way that would return the wrong stack frame, a test will fail to tell you.
35
+ #
36
+ # See benchmarks/skip_frames_for_caller_filter.rb for measurements.
37
+ # Earlier rubies do not support the two argument form of `caller`. This
38
+ # fallback is logically the same, but slower.
39
+ #
40
+ # pkg:gem/rspec-support#lib/rspec/support/caller_filter.rb:47
41
+ def first_non_rspec_line(skip_frames = T.unsafe(nil), increment = T.unsafe(nil)); end
42
+ end
43
+ end
44
+
45
+ # pkg:gem/rspec-support#lib/rspec/support/caller_filter.rb:18
46
+ RSpec::CallerFilter::ADDITIONAL_TOP_LEVEL_FILES = T.let(T.unsafe(nil), Array)
47
+
48
+ # rubygems/core_ext/kernel_require.rb isn't actually part of rspec (obviously) but we want
49
+ # it ignored when we are looking for the first meaningful line of the backtrace outside
50
+ # of RSpec. It can show up in the backtrace as the immediate first caller
51
+ # when `CallerFilter.first_non_rspec_line` is called from the top level of a required
52
+ # file, but it depends on if rubygems is loaded or not. We don't want to have to deal
53
+ # with this complexity in our `RSpec.deprecate` calls, so we ignore it here.
54
+ #
55
+ # pkg:gem/rspec-support#lib/rspec/support/caller_filter.rb:28
56
+ RSpec::CallerFilter::IGNORE_REGEX = T.let(T.unsafe(nil), Regexp)
57
+
58
+ # pkg:gem/rspec-support#lib/rspec/support/caller_filter.rb:20
59
+ RSpec::CallerFilter::LIB_REGEX = T.let(T.unsafe(nil), Regexp)
60
+
61
+ # pkg:gem/rspec-support#lib/rspec/support/caller_filter.rb:9
62
+ RSpec::CallerFilter::RSPEC_LIBS = T.let(T.unsafe(nil), Array)
63
+
64
+ # pkg:gem/rspec-support#lib/rspec/support.rb:2
65
+ module RSpec::Support
66
+ class << self
67
+ # @api private
68
+ #
69
+ # Used internally to get a class of a given object, even if it does not respond to #class.
70
+ #
71
+ # pkg:gem/rspec-support#lib/rspec/support.rb:84
72
+ def class_of(object); end
73
+
74
+ # @api private
75
+ #
76
+ # Defines a helper method that is optimized to require files from the
77
+ # named lib. The passed block MUST be `{ |f| require_relative f }`
78
+ # because for `require_relative` to work properly from within the named
79
+ # lib the line of code must be IN that lib.
80
+ #
81
+ # `require_relative` is preferred when available because it is always O(1),
82
+ # regardless of the number of dirs in $LOAD_PATH. `require`, on the other
83
+ # hand, does a linear O(N) search over the dirs in the $LOAD_PATH until
84
+ # it can resolve the file relative to one of the dirs.
85
+ #
86
+ # pkg:gem/rspec-support#lib/rspec/support.rb:14
87
+ def define_optimized_require_for_rspec(lib, &require_relative); end
88
+
89
+ # Remove a previously registered matcher. Useful for cleaning up after
90
+ # yourself in specs.
91
+ #
92
+ # @private
93
+ #
94
+ # pkg:gem/rspec-support#lib/rspec/support/matcher_definition.rb:22
95
+ def deregister_matcher_definition(&block); end
96
+
97
+ # @api private
98
+ #
99
+ # pkg:gem/rspec-support#lib/rspec/support.rb:111
100
+ def failure_notifier; end
101
+
102
+ # @api private
103
+ #
104
+ # pkg:gem/rspec-support#lib/rspec/support.rb:103
105
+ def failure_notifier=(callable); end
106
+
107
+ # @private
108
+ #
109
+ # pkg:gem/rspec-support#lib/rspec/support/matcher_definition.rb:27
110
+ def is_a_matcher?(object); end
111
+
112
+ # @private
113
+ #
114
+ # pkg:gem/rspec-support#lib/rspec/support/matcher_definition.rb:4
115
+ def matcher_definitions; end
116
+
117
+ # pkg:gem/rspec-support#lib/rspec/support.rb:52
118
+ def method_handle_for(object, method_name); end
119
+
120
+ # @api private
121
+ #
122
+ # pkg:gem/rspec-support#lib/rspec/support.rb:116
123
+ def notify_failure(failure, options = T.unsafe(nil)); end
124
+
125
+ # Used internally to break cyclic dependency between mocks, expectations,
126
+ # and support. We don't currently have a consistent implementation of our
127
+ # matchers, though we are considering changing that:
128
+ # https://github.com/rspec/rspec-mocks/issues/513
129
+ #
130
+ # @private
131
+ #
132
+ # pkg:gem/rspec-support#lib/rspec/support/matcher_definition.rb:14
133
+ def register_matcher_definition(&block); end
134
+
135
+ # pkg:gem/rspec-support#lib/rspec/support.rb:23
136
+ def require_rspec_support(f); end
137
+
138
+ # @api private
139
+ #
140
+ # gives a string representation of an object for use in RSpec descriptions
141
+ #
142
+ # pkg:gem/rspec-support#lib/rspec/support/matcher_definition.rb:34
143
+ def rspec_description_for_object(object); end
144
+
145
+ # pkg:gem/rspec-support#lib/rspec/support.rb:93
146
+ def thread_local_data; end
147
+
148
+ # @api private
149
+ # @api private
150
+ #
151
+ # pkg:gem/rspec-support#lib/rspec/support.rb:138
152
+ def warning_notifier; end
153
+
154
+ # @api private
155
+ # @api private
156
+ #
157
+ # pkg:gem/rspec-support#lib/rspec/support.rb:131
158
+ def warning_notifier=(_arg0); end
159
+
160
+ # @api private
161
+ #
162
+ # pkg:gem/rspec-support#lib/rspec/support.rb:121
163
+ def with_failure_notifier(callable); end
164
+ end
165
+ end
166
+
167
+ # @private
168
+ #
169
+ # pkg:gem/rspec-support#lib/rspec/support.rb:143
170
+ module RSpec::Support::AllExceptionsExceptOnesWeMustNotRescue
171
+ class << self
172
+ # pkg:gem/rspec-support#lib/rspec/support.rb:148
173
+ def ===(exception); end
174
+ end
175
+ end
176
+
177
+ # These exceptions are dangerous to rescue as rescuing them
178
+ # would interfere with things we should not interfere with.
179
+ #
180
+ # pkg:gem/rspec-support#lib/rspec/support.rb:146
181
+ RSpec::Support::AllExceptionsExceptOnesWeMustNotRescue::AVOID_RESCUING = T.let(T.unsafe(nil), Array)
182
+
183
+ # Deals with the slightly different semantics of block arguments.
184
+ # For methods, arguments are required unless a default value is provided.
185
+ # For blocks, arguments are optional, even if no default value is provided.
186
+ #
187
+ # However, we want to treat block args as required since you virtually
188
+ # always want to pass a value for each received argument and our
189
+ # `and_yield` has treated block args as required for many years.
190
+ #
191
+ # @api private
192
+ #
193
+ # pkg:gem/rspec-support#lib/rspec/support/method_signature_verifier.rb:266
194
+ class RSpec::Support::BlockSignature < ::RSpec::Support::MethodSignature
195
+ # pkg:gem/rspec-support#lib/rspec/support/method_signature_verifier.rb:268
196
+ def classify_parameters; end
197
+ end
198
+
199
+ # @private
200
+ #
201
+ # pkg:gem/rspec-support#lib/rspec/support/comparable_version.rb:4
202
+ class RSpec::Support::ComparableVersion
203
+ include ::Comparable
204
+
205
+ # pkg:gem/rspec-support#lib/rspec/support/comparable_version.rb:9
206
+ def initialize(string); end
207
+
208
+ # pkg:gem/rspec-support#lib/rspec/support/comparable_version.rb:13
209
+ def <=>(other); end
210
+
211
+ # pkg:gem/rspec-support#lib/rspec/support/comparable_version.rb:35
212
+ def segments; end
213
+
214
+ # pkg:gem/rspec-support#lib/rspec/support/comparable_version.rb:7
215
+ def string; end
216
+ end
217
+
218
+ # @private
219
+ #
220
+ # pkg:gem/rspec-support#lib/rspec/support.rb:108
221
+ RSpec::Support::DEFAULT_FAILURE_NOTIFIER = T.let(T.unsafe(nil), Proc)
222
+
223
+ # @private
224
+ #
225
+ # pkg:gem/rspec-support#lib/rspec/support.rb:135
226
+ RSpec::Support::DEFAULT_WARNING_NOTIFIER = T.let(T.unsafe(nil), Proc)
227
+
228
+ # pkg:gem/rspec-support#lib/rspec/support/differ.rb:10
229
+ class RSpec::Support::Differ
230
+ # pkg:gem/rspec-support#lib/rspec/support/differ.rb:67
231
+ def initialize(opts = T.unsafe(nil)); end
232
+
233
+ # pkg:gem/rspec-support#lib/rspec/support/differ.rb:63
234
+ def color?; end
235
+
236
+ # pkg:gem/rspec-support#lib/rspec/support/differ.rb:11
237
+ def diff(actual, expected); end
238
+
239
+ # pkg:gem/rspec-support#lib/rspec/support/differ.rb:57
240
+ def diff_as_object(actual, expected); end
241
+
242
+ # pkg:gem/rspec-support#lib/rspec/support/differ.rb:28
243
+ def diff_as_string(actual, expected); end
244
+
245
+ private
246
+
247
+ # pkg:gem/rspec-support#lib/rspec/support/differ.rb:128
248
+ def add_old_hunk_to_hunk(hunk, oldhunk); end
249
+
250
+ # pkg:gem/rspec-support#lib/rspec/support/differ.rb:124
251
+ def add_to_output(output, string); end
252
+
253
+ # pkg:gem/rspec-support#lib/rspec/support/differ.rb:78
254
+ def all_strings?(*args); end
255
+
256
+ # pkg:gem/rspec-support#lib/rspec/support/differ.rb:82
257
+ def any_multiline_strings?(*args); end
258
+
259
+ # pkg:gem/rspec-support#lib/rspec/support/differ.rb:153
260
+ def blue(text); end
261
+
262
+ # pkg:gem/rspec-support#lib/rspec/support/differ.rb:115
263
+ def build_hunks(actual, expected); end
264
+
265
+ # pkg:gem/rspec-support#lib/rspec/support/differ.rb:90
266
+ def coerce_to_string(string_or_array); end
267
+
268
+ # pkg:gem/rspec-support#lib/rspec/support/differ.rb:141
269
+ def color(text, color_code); end
270
+
271
+ # pkg:gem/rspec-support#lib/rspec/support/differ.rb:161
272
+ def color_diff(diff); end
273
+
274
+ # pkg:gem/rspec-support#lib/rspec/support/differ.rb:95
275
+ def diffably_stringify(array); end
276
+
277
+ # pkg:gem/rspec-support#lib/rspec/support/differ.rb:119
278
+ def finalize_output(output, final_line); end
279
+
280
+ # pkg:gem/rspec-support#lib/rspec/support/differ.rb:137
281
+ def format_type; end
282
+
283
+ # pkg:gem/rspec-support#lib/rspec/support/differ.rb:149
284
+ def green(text); end
285
+
286
+ # pkg:gem/rspec-support#lib/rspec/support/differ.rb:202
287
+ def handle_encoding_errors(actual, expected); end
288
+
289
+ # pkg:gem/rspec-support#lib/rspec/support/differ.rb:192
290
+ def hash_to_string(hash); end
291
+
292
+ # pkg:gem/rspec-support#lib/rspec/support/differ.rb:106
293
+ def multiline?(string); end
294
+
295
+ # pkg:gem/rspec-support#lib/rspec/support/differ.rb:86
296
+ def no_numbers?(*args); end
297
+
298
+ # pkg:gem/rspec-support#lib/rspec/support/differ.rb:74
299
+ def no_procs?(*args); end
300
+
301
+ # pkg:gem/rspec-support#lib/rspec/support/differ.rb:157
302
+ def normal(text); end
303
+
304
+ # pkg:gem/rspec-support#lib/rspec/support/differ.rb:178
305
+ def object_to_string(object); end
306
+
307
+ # pkg:gem/rspec-support#lib/rspec/support/differ.rb:145
308
+ def red(text); end
309
+
310
+ # pkg:gem/rspec-support#lib/rspec/support/differ.rb:132
311
+ def safely_flatten(array); end
312
+ end
313
+
314
+ # @api private
315
+ #
316
+ # Replacement for fileutils#mkdir_p because we don't want to require parts
317
+ # of stdlib in RSpec.
318
+ #
319
+ # pkg:gem/rspec-support#lib/rspec/support/directory_maker.rb:9
320
+ class RSpec::Support::DirectoryMaker
321
+ class << self
322
+ # @api private
323
+ #
324
+ # Implements nested directory construction
325
+ #
326
+ # pkg:gem/rspec-support#lib/rspec/support/directory_maker.rb:13
327
+ def mkdir_p(path); end
328
+
329
+ private
330
+
331
+ # pkg:gem/rspec-support#lib/rspec/support/directory_maker.rb:55
332
+ def directory_exists?(dirname); end
333
+
334
+ # pkg:gem/rspec-support#lib/rspec/support/directory_maker.rb:50
335
+ def generate_path(stack, part); end
336
+
337
+ # pkg:gem/rspec-support#lib/rspec/support/directory_maker.rb:47
338
+ def generate_stack(path); end
339
+ end
340
+ end
341
+
342
+ # @private
343
+ #
344
+ # pkg:gem/rspec-support#lib/rspec/support/encoded_string.rb:4
345
+ class RSpec::Support::EncodedString
346
+ # pkg:gem/rspec-support#lib/rspec/support/encoded_string.rb:14
347
+ def initialize(string, encoding = T.unsafe(nil)); end
348
+
349
+ # pkg:gem/rspec-support#lib/rspec/support/encoded_string.rb:26
350
+ def <<(string); end
351
+
352
+ # pkg:gem/rspec-support#lib/rspec/support/encoded_string.rb:23
353
+ def ==(*args, &block); end
354
+
355
+ # pkg:gem/rspec-support#lib/rspec/support/encoded_string.rb:23
356
+ def empty?(*args, &block); end
357
+
358
+ # pkg:gem/rspec-support#lib/rspec/support/encoded_string.rb:23
359
+ def encoding(*args, &block); end
360
+
361
+ # pkg:gem/rspec-support#lib/rspec/support/encoded_string.rb:23
362
+ def eql?(*args, &block); end
363
+
364
+ # pkg:gem/rspec-support#lib/rspec/support/encoded_string.rb:23
365
+ def lines(*args, &block); end
366
+
367
+ # pkg:gem/rspec-support#lib/rspec/support/encoded_string.rb:19
368
+ def source_encoding; end
369
+
370
+ # pkg:gem/rspec-support#lib/rspec/support/encoded_string.rb:39
371
+ def split(regex_or_string); end
372
+
373
+ # pkg:gem/rspec-support#lib/rspec/support/encoded_string.rb:44
374
+ def to_s; end
375
+
376
+ # pkg:gem/rspec-support#lib/rspec/support/encoded_string.rb:47
377
+ def to_str; end
378
+
379
+ private
380
+
381
+ # pkg:gem/rspec-support#lib/rspec/support/encoded_string.rb:137
382
+ def detect_source_encoding(string); end
383
+
384
+ # Encoding Exceptions:
385
+ #
386
+ # Raised by Encoding and String methods:
387
+ # Encoding::UndefinedConversionError:
388
+ # when a transcoding operation fails
389
+ # if the String contains characters invalid for the target encoding
390
+ # e.g. "\x80".encode('UTF-8','ASCII-8BIT')
391
+ # vs "\x80".encode('UTF-8','ASCII-8BIT', undef: :replace, replace: '<undef>')
392
+ # # => '<undef>'
393
+ # Encoding::CompatibilityError
394
+ # when Encoding.compatible?(str1, str2) is nil
395
+ # e.g. utf_16le_emoji_string.split("\n")
396
+ # e.g. valid_unicode_string.encode(utf8_encoding) << ascii_string
397
+ # Encoding::InvalidByteSequenceError:
398
+ # when the string being transcoded contains a byte invalid for
399
+ # either the source or target encoding
400
+ # e.g. "\x80".encode('UTF-8','US-ASCII')
401
+ # vs "\x80".encode('UTF-8','US-ASCII', invalid: :replace, replace: '<byte>')
402
+ # # => '<byte>'
403
+ # ArgumentError
404
+ # when operating on a string with invalid bytes
405
+ # e.g."\x80".split("\n")
406
+ # TypeError
407
+ # when a symbol is passed as an encoding
408
+ # Encoding.find(:"UTF-8")
409
+ # when calling force_encoding on an object
410
+ # that doesn't respond to #to_str
411
+ #
412
+ # Raised by transcoding methods:
413
+ # Encoding::ConverterNotFoundError:
414
+ # when a named encoding does not correspond with a known converter
415
+ # e.g. 'abc'.force_encoding('UTF-8').encode('foo')
416
+ # or a converter path cannot be found
417
+ # e.g. "\x80".force_encoding('ASCII-8BIT').encode('Emacs-Mule')
418
+ #
419
+ # Raised by byte <-> char conversions
420
+ # RangeError: out of char range
421
+ # e.g. the UTF-16LE emoji: 128169.chr
422
+ #
423
+ # pkg:gem/rspec-support#lib/rspec/support/encoded_string.rb:91
424
+ def matching_encoding(string); end
425
+
426
+ # https://github.com/ruby/ruby/blob/eeb05e8c11/doc/NEWS-2.1.0#L120-L123
427
+ # https://github.com/ruby/ruby/blob/v2_1_0/string.c#L8242
428
+ # https://github.com/hsbt/string-scrub
429
+ # https://github.com/rubinius/rubinius/blob/v2.5.2/kernel/common/string.rb#L1913-L1972
430
+ # http://stackoverflow.com/a/8711118/879854
431
+ # Loop over chars in a string replacing chars
432
+ # with invalid encoding, which is a pretty good proxy
433
+ # for the invalid byte sequence that causes an ArgumentError
434
+ #
435
+ # pkg:gem/rspec-support#lib/rspec/support/encoded_string.rb:122
436
+ def remove_invalid_bytes(string); end
437
+
438
+ class << self
439
+ # pkg:gem/rspec-support#lib/rspec/support/encoded_string.rb:141
440
+ def pick_encoding(source_a, source_b); end
441
+ end
442
+ end
443
+
444
+ # Ruby's default replacement string is:
445
+ # U+FFFD ("\xEF\xBF\xBD"), for Unicode encoding forms, else
446
+ # ? ("\x3F")
447
+ #
448
+ # pkg:gem/rspec-support#lib/rspec/support/encoded_string.rb:12
449
+ RSpec::Support::EncodedString::REPLACE = T.let(T.unsafe(nil), String)
450
+
451
+ # pkg:gem/rspec-support#lib/rspec/support/encoded_string.rb:7
452
+ RSpec::Support::EncodedString::US_ASCII = T.let(T.unsafe(nil), String)
453
+
454
+ # Reduce allocations by storing constants.
455
+ #
456
+ # pkg:gem/rspec-support#lib/rspec/support/encoded_string.rb:6
457
+ RSpec::Support::EncodedString::UTF_8 = T.let(T.unsafe(nil), String)
458
+
459
+ # @private
460
+ #
461
+ # pkg:gem/rspec-support#lib/rspec/support/hunk_generator.rb:7
462
+ class RSpec::Support::HunkGenerator
463
+ # pkg:gem/rspec-support#lib/rspec/support/hunk_generator.rb:8
464
+ def initialize(actual, expected); end
465
+
466
+ # pkg:gem/rspec-support#lib/rspec/support/hunk_generator.rb:13
467
+ def hunks; end
468
+
469
+ private
470
+
471
+ # pkg:gem/rspec-support#lib/rspec/support/hunk_generator.rb:30
472
+ def actual_lines; end
473
+
474
+ # pkg:gem/rspec-support#lib/rspec/support/hunk_generator.rb:34
475
+ def build_hunk(piece); end
476
+
477
+ # pkg:gem/rspec-support#lib/rspec/support/hunk_generator.rb:42
478
+ def context_lines; end
479
+
480
+ # pkg:gem/rspec-support#lib/rspec/support/hunk_generator.rb:22
481
+ def diffs; end
482
+
483
+ # pkg:gem/rspec-support#lib/rspec/support/hunk_generator.rb:26
484
+ def expected_lines; end
485
+ end
486
+
487
+ # @api private
488
+ #
489
+ # pkg:gem/rspec-support#lib/rspec/support.rb:38
490
+ RSpec::Support::KERNEL_METHOD_METHOD = T.let(T.unsafe(nil), UnboundMethod)
491
+
492
+ # Allows matchers to be used instead of providing keyword arguments. In
493
+ # practice, when this happens only the arity of the method is verified.
494
+ #
495
+ # @private
496
+ #
497
+ # pkg:gem/rspec-support#lib/rspec/support/method_signature_verifier.rb:391
498
+ class RSpec::Support::LooseSignatureVerifier < ::RSpec::Support::MethodSignatureVerifier
499
+ private
500
+
501
+ # pkg:gem/rspec-support#lib/rspec/support/method_signature_verifier.rb:394
502
+ def split_args(*args); end
503
+ end
504
+
505
+ # If a matcher is used in a signature in place of keyword arguments, all
506
+ # keyword argument validation needs to be skipped since the matcher is
507
+ # opaque.
508
+ #
509
+ # Instead, keyword arguments will be validated when the method is called
510
+ # and they are actually known.
511
+ #
512
+ # @private
513
+ #
514
+ # pkg:gem/rspec-support#lib/rspec/support/method_signature_verifier.rb:411
515
+ class RSpec::Support::LooseSignatureVerifier::SignatureWithKeywordArgumentsMatcher
516
+ # pkg:gem/rspec-support#lib/rspec/support/method_signature_verifier.rb:412
517
+ def initialize(signature); end
518
+
519
+ # pkg:gem/rspec-support#lib/rspec/support/method_signature_verifier.rb:432
520
+ def has_kw_args_in?(args); end
521
+
522
+ # pkg:gem/rspec-support#lib/rspec/support/method_signature_verifier.rb:420
523
+ def invalid_kw_args_from(_kw_args); end
524
+
525
+ # pkg:gem/rspec-support#lib/rspec/support/method_signature_verifier.rb:416
526
+ def missing_kw_args_from(_kw_args); end
527
+
528
+ # pkg:gem/rspec-support#lib/rspec/support/method_signature_verifier.rb:424
529
+ def non_kw_args_arity_description; end
530
+
531
+ # pkg:gem/rspec-support#lib/rspec/support/method_signature_verifier.rb:428
532
+ def valid_non_kw_args?(*args); end
533
+ end
534
+
535
+ # Extracts info about the number of arguments and allowed/required
536
+ # keyword args of a given method.
537
+ #
538
+ # @private
539
+ #
540
+ # pkg:gem/rspec-support#lib/rspec/support/method_signature_verifier.rb:11
541
+ class RSpec::Support::MethodSignature
542
+ # pkg:gem/rspec-support#lib/rspec/support/method_signature_verifier.rb:14
543
+ def initialize(method); end
544
+
545
+ # pkg:gem/rspec-support#lib/rspec/support/method_signature_verifier.rb:96
546
+ def arbitrary_kw_args?; end
547
+
548
+ # pkg:gem/rspec-support#lib/rspec/support/method_signature_verifier.rb:36
549
+ def classify_arity(arity = T.unsafe(nil)); end
550
+
551
+ # pkg:gem/rspec-support#lib/rspec/support/method_signature_verifier.rb:104
552
+ def classify_parameters; end
553
+
554
+ # Without considering what the last arg is, could it
555
+ # contain keyword arguments?
556
+ #
557
+ # pkg:gem/rspec-support#lib/rspec/support/method_signature_verifier.rb:90
558
+ def could_contain_kw_args?(args); end
559
+
560
+ # pkg:gem/rspec-support#lib/rspec/support/method_signature_verifier.rb:49
561
+ def description; end
562
+
563
+ # If the last argument is Hash, Ruby will treat only symbol keys as keyword arguments
564
+ # the rest will be grouped in another Hash and passed as positional argument.
565
+ #
566
+ # pkg:gem/rspec-support#lib/rspec/support/method_signature_verifier.rb:82
567
+ def has_kw_args_in?(args); end
568
+
569
+ # pkg:gem/rspec-support#lib/rspec/support/method_signature_verifier.rb:75
570
+ def invalid_kw_args_from(given_kw_args); end
571
+
572
+ # pkg:gem/rspec-support#lib/rspec/support/method_signature_verifier.rb:12
573
+ def max_non_kw_args; end
574
+
575
+ # pkg:gem/rspec-support#lib/rspec/support/method_signature_verifier.rb:12
576
+ def min_non_kw_args; end
577
+
578
+ # pkg:gem/rspec-support#lib/rspec/support/method_signature_verifier.rb:71
579
+ def missing_kw_args_from(given_kw_args); end
580
+
581
+ # pkg:gem/rspec-support#lib/rspec/support/method_signature_verifier.rb:21
582
+ def non_kw_args_arity_description; end
583
+
584
+ # pkg:gem/rspec-support#lib/rspec/support/method_signature_verifier.rb:12
585
+ def optional_kw_args; end
586
+
587
+ # pkg:gem/rspec-support#lib/rspec/support/method_signature_verifier.rb:12
588
+ def required_kw_args; end
589
+
590
+ # pkg:gem/rspec-support#lib/rspec/support/method_signature_verifier.rb:100
591
+ def unlimited_args?; end
592
+
593
+ # pkg:gem/rspec-support#lib/rspec/support/method_signature_verifier.rb:29
594
+ def valid_non_kw_args?(positional_arg_count, optional_max_arg_count = T.unsafe(nil)); end
595
+ end
596
+
597
+ # pkg:gem/rspec-support#lib/rspec/support/method_signature_verifier.rb:160
598
+ RSpec::Support::MethodSignature::INFINITY = T.let(T.unsafe(nil), Float)
599
+
600
+ # Encapsulates expectations about the number of arguments and
601
+ # allowed/required keyword args of a given method.
602
+ #
603
+ # @api private
604
+ #
605
+ # pkg:gem/rspec-support#lib/rspec/support/method_signature_verifier.rb:217
606
+ class RSpec::Support::MethodSignatureExpectation
607
+ # pkg:gem/rspec-support#lib/rspec/support/method_signature_verifier.rb:218
608
+ def initialize; end
609
+
610
+ # pkg:gem/rspec-support#lib/rspec/support/method_signature_verifier.rb:245
611
+ def empty?; end
612
+
613
+ # pkg:gem/rspec-support#lib/rspec/support/method_signature_verifier.rb:229
614
+ def expect_arbitrary_keywords; end
615
+
616
+ # pkg:gem/rspec-support#lib/rspec/support/method_signature_verifier.rb:229
617
+ def expect_arbitrary_keywords=(_arg0); end
618
+
619
+ # pkg:gem/rspec-support#lib/rspec/support/method_signature_verifier.rb:229
620
+ def expect_unlimited_arguments; end
621
+
622
+ # pkg:gem/rspec-support#lib/rspec/support/method_signature_verifier.rb:229
623
+ def expect_unlimited_arguments=(_arg0); end
624
+
625
+ # pkg:gem/rspec-support#lib/rspec/support/method_signature_verifier.rb:227
626
+ def keywords; end
627
+
628
+ # pkg:gem/rspec-support#lib/rspec/support/method_signature_verifier.rb:252
629
+ def keywords=(values); end
630
+
631
+ # pkg:gem/rspec-support#lib/rspec/support/method_signature_verifier.rb:227
632
+ def max_count; end
633
+
634
+ # pkg:gem/rspec-support#lib/rspec/support/method_signature_verifier.rb:231
635
+ def max_count=(number); end
636
+
637
+ # pkg:gem/rspec-support#lib/rspec/support/method_signature_verifier.rb:227
638
+ def min_count; end
639
+
640
+ # pkg:gem/rspec-support#lib/rspec/support/method_signature_verifier.rb:238
641
+ def min_count=(number); end
642
+ end
643
+
644
+ # Abstract base class for signature verifiers.
645
+ #
646
+ # @api private
647
+ #
648
+ # pkg:gem/rspec-support#lib/rspec/support/method_signature_verifier.rb:278
649
+ class RSpec::Support::MethodSignatureVerifier
650
+ # pkg:gem/rspec-support#lib/rspec/support/method_signature_verifier.rb:281
651
+ def initialize(signature, args = T.unsafe(nil)); end
652
+
653
+ # pkg:gem/rspec-support#lib/rspec/support/method_signature_verifier.rb:324
654
+ def error_message; end
655
+
656
+ # pkg:gem/rspec-support#lib/rspec/support/method_signature_verifier.rb:279
657
+ def kw_args; end
658
+
659
+ # pkg:gem/rspec-support#lib/rspec/support/method_signature_verifier.rb:279
660
+ def max_non_kw_args; end
661
+
662
+ # pkg:gem/rspec-support#lib/rspec/support/method_signature_verifier.rb:279
663
+ def min_non_kw_args; end
664
+
665
+ # pkg:gem/rspec-support#lib/rspec/support/method_signature_verifier.rb:279
666
+ def non_kw_args; end
667
+
668
+ # pkg:gem/rspec-support#lib/rspec/support/method_signature_verifier.rb:316
669
+ def valid?; end
670
+
671
+ # pkg:gem/rspec-support#lib/rspec/support/method_signature_verifier.rb:288
672
+ def with_expectation(expectation); end
673
+
674
+ private
675
+
676
+ # pkg:gem/rspec-support#lib/rspec/support/method_signature_verifier.rb:355
677
+ def arbitrary_kw_args?; end
678
+
679
+ # pkg:gem/rspec-support#lib/rspec/support/method_signature_verifier.rb:351
680
+ def invalid_kw_args; end
681
+
682
+ # pkg:gem/rspec-support#lib/rspec/support/method_signature_verifier.rb:347
683
+ def missing_kw_args; end
684
+
685
+ # pkg:gem/rspec-support#lib/rspec/support/method_signature_verifier.rb:363
686
+ def split_args(*args); end
687
+
688
+ # pkg:gem/rspec-support#lib/rspec/support/method_signature_verifier.rb:359
689
+ def unlimited_args?; end
690
+
691
+ # pkg:gem/rspec-support#lib/rspec/support/method_signature_verifier.rb:343
692
+ def valid_non_kw_args?; end
693
+ end
694
+
695
+ # On 1.8.7, it's in the stdlib.
696
+ # We don't want to load the stdlib, b/c this is a test tool, and can affect
697
+ # the test environment, causing tests to pass where they should fail.
698
+ #
699
+ # So we're transcribing/modifying it from
700
+ # https://github.com/ruby/ruby/blob/v1_8_7_374/lib/thread.rb#L56
701
+ # Some methods we don't need are deleted. Anything I don't
702
+ # understand (there's quite a bit, actually) is left in.
703
+ #
704
+ # Some formatting changes are made to appease the robot overlord:
705
+ # https://travis-ci.org/rspec/rspec-core/jobs/54410874
706
+ # @private
707
+ # On 1.9 and up, this is in core, so we just use the real one
708
+ #
709
+ # pkg:gem/rspec-support#lib/rspec/support/reentrant_mutex.rb:63
710
+ class RSpec::Support::Mutex < ::Thread::Mutex
711
+ class << self
712
+ # pkg:gem/rspec-support#lib/rspec/support/reentrant_mutex.rb:68
713
+ def new; end
714
+ end
715
+ end
716
+
717
+ # If you mock Mutex.new you break our usage of Mutex, so
718
+ # instead we capture the original method to return Mutexs.
719
+ #
720
+ # pkg:gem/rspec-support#lib/rspec/support/reentrant_mutex.rb:66
721
+ RSpec::Support::Mutex::NEW_MUTEX_METHOD = T.let(T.unsafe(nil), Method)
722
+
723
+ # @api private
724
+ #
725
+ # Provides query methods for different OS or OS features.
726
+ #
727
+ # pkg:gem/rspec-support#lib/rspec/support/ruby_features.rb:9
728
+ module RSpec::Support::OS
729
+ private
730
+
731
+ # pkg:gem/rspec-support#lib/rspec/support/ruby_features.rb:12
732
+ def windows?; end
733
+
734
+ # pkg:gem/rspec-support#lib/rspec/support/ruby_features.rb:16
735
+ def windows_file_path?; end
736
+
737
+ class << self
738
+ # pkg:gem/rspec-support#lib/rspec/support/ruby_features.rb:12
739
+ def windows?; end
740
+
741
+ # pkg:gem/rspec-support#lib/rspec/support/ruby_features.rb:16
742
+ def windows_file_path?; end
743
+ end
744
+ end
745
+
746
+ # Provide additional output details beyond what `inspect` provides when
747
+ # printing Time, DateTime, or BigDecimal
748
+ # @api private
749
+ #
750
+ # pkg:gem/rspec-support#lib/rspec/support/object_formatter.rb:8
751
+ class RSpec::Support::ObjectFormatter
752
+ # pkg:gem/rspec-support#lib/rspec/support/object_formatter.rb:27
753
+ def initialize(max_formatted_output_length = T.unsafe(nil)); end
754
+
755
+ # pkg:gem/rspec-support#lib/rspec/support/object_formatter.rb:32
756
+ def format(object); end
757
+
758
+ # pkg:gem/rspec-support#lib/rspec/support/object_formatter.rb:11
759
+ def max_formatted_output_length; end
760
+
761
+ # pkg:gem/rspec-support#lib/rspec/support/object_formatter.rb:11
762
+ def max_formatted_output_length=(_arg0); end
763
+
764
+ # pkg:gem/rspec-support#lib/rspec/support/object_formatter.rb:68
765
+ def prepare_array(array); end
766
+
767
+ # pkg:gem/rspec-support#lib/rspec/support/object_formatter.rb:92
768
+ def prepare_element(element); end
769
+
770
+ # Prepares the provided object to be formatted by wrapping it as needed
771
+ # in something that, when `inspect` is called on it, will produce the
772
+ # desired output.
773
+ #
774
+ # This allows us to apply the desired formatting to hash/array data structures
775
+ # at any level of nesting, simply by walking that structure and replacing items
776
+ # with custom items that have `inspect` defined to return the desired output
777
+ # for that item. Then we can just use `Array#inspect` or `Hash#inspect` to
778
+ # format the entire thing.
779
+ #
780
+ # pkg:gem/rspec-support#lib/rspec/support/object_formatter.rb:56
781
+ def prepare_for_inspection(object); end
782
+
783
+ # pkg:gem/rspec-support#lib/rspec/support/object_formatter.rb:74
784
+ def prepare_hash(input_hash); end
785
+
786
+ # pkg:gem/rspec-support#lib/rspec/support/object_formatter.rb:111
787
+ def recursive_structure?(object); end
788
+
789
+ # pkg:gem/rspec-support#lib/rspec/support/object_formatter.rb:84
790
+ def sort_hash_keys(input_hash); end
791
+
792
+ # pkg:gem/rspec-support#lib/rspec/support/object_formatter.rb:104
793
+ def with_entering_structure(structure); end
794
+
795
+ private
796
+
797
+ # Returns the substring defined by the start_index and end_index
798
+ # If the string ends with a partial ANSI code code then that
799
+ # will be removed as printing partial ANSI
800
+ # codes to the terminal can lead to corruption
801
+ #
802
+ # pkg:gem/rspec-support#lib/rspec/support/object_formatter.rb:266
803
+ def truncate_string(str, start_index, end_index); end
804
+
805
+ class << self
806
+ # Methods are deferred to a default instance of the class to maintain the interface
807
+ # For example, calling ObjectFormatter.format is still possible
808
+ #
809
+ # pkg:gem/rspec-support#lib/rspec/support/object_formatter.rb:15
810
+ def default_instance; end
811
+
812
+ # pkg:gem/rspec-support#lib/rspec/support/object_formatter.rb:19
813
+ def format(object); end
814
+
815
+ # pkg:gem/rspec-support#lib/rspec/support/object_formatter.rb:23
816
+ def prepare_for_inspection(object); end
817
+ end
818
+ end
819
+
820
+ # pkg:gem/rspec-support#lib/rspec/support/object_formatter.rb:125
821
+ class RSpec::Support::ObjectFormatter::BaseInspector < ::Struct
822
+ # pkg:gem/rspec-support#lib/rspec/support/object_formatter.rb:125
823
+ def formatter; end
824
+
825
+ # pkg:gem/rspec-support#lib/rspec/support/object_formatter.rb:125
826
+ def formatter=(_); end
827
+
828
+ # pkg:gem/rspec-support#lib/rspec/support/object_formatter.rb:130
829
+ def inspect; end
830
+
831
+ # pkg:gem/rspec-support#lib/rspec/support/object_formatter.rb:125
832
+ def object; end
833
+
834
+ # pkg:gem/rspec-support#lib/rspec/support/object_formatter.rb:125
835
+ def object=(_); end
836
+
837
+ # pkg:gem/rspec-support#lib/rspec/support/object_formatter.rb:134
838
+ def pretty_print(pp); end
839
+
840
+ class << self
841
+ # pkg:gem/rspec-support#lib/rspec/support/object_formatter.rb:125
842
+ def [](*_arg0); end
843
+
844
+ # pkg:gem/rspec-support#lib/rspec/support/object_formatter.rb:126
845
+ def can_inspect?(_object); end
846
+
847
+ # pkg:gem/rspec-support#lib/rspec/support/object_formatter.rb:125
848
+ def inspect; end
849
+
850
+ # pkg:gem/rspec-support#lib/rspec/support/object_formatter.rb:125
851
+ def keyword_init?; end
852
+
853
+ # pkg:gem/rspec-support#lib/rspec/support/object_formatter.rb:125
854
+ def members; end
855
+
856
+ # pkg:gem/rspec-support#lib/rspec/support/object_formatter.rb:125
857
+ def new(*_arg0); end
858
+ end
859
+ end
860
+
861
+ # pkg:gem/rspec-support#lib/rspec/support/object_formatter.rb:175
862
+ class RSpec::Support::ObjectFormatter::BigDecimalInspector < ::RSpec::Support::ObjectFormatter::BaseInspector
863
+ # pkg:gem/rspec-support#lib/rspec/support/object_formatter.rb:180
864
+ def inspect; end
865
+
866
+ class << self
867
+ # pkg:gem/rspec-support#lib/rspec/support/object_formatter.rb:176
868
+ def can_inspect?(object); end
869
+ end
870
+ end
871
+
872
+ # pkg:gem/rspec-support#lib/rspec/support/object_formatter.rb:157
873
+ class RSpec::Support::ObjectFormatter::DateTimeInspector < ::RSpec::Support::ObjectFormatter::BaseInspector
874
+ # ActiveSupport sometimes overrides inspect. If `ActiveSupport` is
875
+ # defined use a custom format string that includes more time precision.
876
+ #
877
+ # pkg:gem/rspec-support#lib/rspec/support/object_formatter.rb:166
878
+ def inspect; end
879
+
880
+ class << self
881
+ # pkg:gem/rspec-support#lib/rspec/support/object_formatter.rb:160
882
+ def can_inspect?(object); end
883
+ end
884
+ end
885
+
886
+ # pkg:gem/rspec-support#lib/rspec/support/object_formatter.rb:158
887
+ RSpec::Support::ObjectFormatter::DateTimeInspector::FORMAT = T.let(T.unsafe(nil), String)
888
+
889
+ # pkg:gem/rspec-support#lib/rspec/support/object_formatter.rb:222
890
+ class RSpec::Support::ObjectFormatter::DelegatorInspector < ::RSpec::Support::ObjectFormatter::BaseInspector
891
+ # pkg:gem/rspec-support#lib/rspec/support/object_formatter.rb:227
892
+ def inspect; end
893
+
894
+ class << self
895
+ # pkg:gem/rspec-support#lib/rspec/support/object_formatter.rb:223
896
+ def can_inspect?(object); end
897
+ end
898
+ end
899
+
900
+ # pkg:gem/rspec-support#lib/rspec/support/object_formatter.rb:185
901
+ class RSpec::Support::ObjectFormatter::DescribableMatcherInspector < ::RSpec::Support::ObjectFormatter::BaseInspector
902
+ # pkg:gem/rspec-support#lib/rspec/support/object_formatter.rb:190
903
+ def inspect; end
904
+
905
+ class << self
906
+ # pkg:gem/rspec-support#lib/rspec/support/object_formatter.rb:186
907
+ def can_inspect?(object); end
908
+ end
909
+ end
910
+
911
+ # pkg:gem/rspec-support#lib/rspec/support/object_formatter.rb:9
912
+ RSpec::Support::ObjectFormatter::ELLIPSIS = T.let(T.unsafe(nil), String)
913
+
914
+ # pkg:gem/rspec-support#lib/rspec/support/object_formatter.rb:245
915
+ RSpec::Support::ObjectFormatter::INSPECTOR_CLASSES = T.let(T.unsafe(nil), Array)
916
+
917
+ # pkg:gem/rspec-support#lib/rspec/support/object_formatter.rb:115
918
+ class RSpec::Support::ObjectFormatter::InspectableItem < ::Struct
919
+ # pkg:gem/rspec-support#lib/rspec/support/object_formatter.rb:116
920
+ def inspect; end
921
+
922
+ # pkg:gem/rspec-support#lib/rspec/support/object_formatter.rb:120
923
+ def pretty_print(pp); end
924
+
925
+ # pkg:gem/rspec-support#lib/rspec/support/object_formatter.rb:115
926
+ def text; end
927
+
928
+ # pkg:gem/rspec-support#lib/rspec/support/object_formatter.rb:115
929
+ def text=(_); end
930
+
931
+ class << self
932
+ # pkg:gem/rspec-support#lib/rspec/support/object_formatter.rb:115
933
+ def [](*_arg0); end
934
+
935
+ # pkg:gem/rspec-support#lib/rspec/support/object_formatter.rb:115
936
+ def inspect; end
937
+
938
+ # pkg:gem/rspec-support#lib/rspec/support/object_formatter.rb:115
939
+ def keyword_init?; end
940
+
941
+ # pkg:gem/rspec-support#lib/rspec/support/object_formatter.rb:115
942
+ def members; end
943
+
944
+ # pkg:gem/rspec-support#lib/rspec/support/object_formatter.rb:115
945
+ def new(*_arg0); end
946
+ end
947
+ end
948
+
949
+ # pkg:gem/rspec-support#lib/rspec/support/object_formatter.rb:232
950
+ class RSpec::Support::ObjectFormatter::InspectableObjectInspector < ::RSpec::Support::ObjectFormatter::BaseInspector
951
+ # pkg:gem/rspec-support#lib/rspec/support/object_formatter.rb:240
952
+ def inspect; end
953
+
954
+ class << self
955
+ # pkg:gem/rspec-support#lib/rspec/support/object_formatter.rb:233
956
+ def can_inspect?(object); end
957
+ end
958
+ end
959
+
960
+ # pkg:gem/rspec-support#lib/rspec/support/object_formatter.rb:139
961
+ class RSpec::Support::ObjectFormatter::TimeInspector < ::RSpec::Support::ObjectFormatter::BaseInspector
962
+ # for 1.8.7
963
+ #
964
+ # pkg:gem/rspec-support#lib/rspec/support/object_formatter.rb:147
965
+ def inspect; end
966
+
967
+ class << self
968
+ # pkg:gem/rspec-support#lib/rspec/support/object_formatter.rb:142
969
+ def can_inspect?(object); end
970
+ end
971
+ end
972
+
973
+ # pkg:gem/rspec-support#lib/rspec/support/object_formatter.rb:140
974
+ RSpec::Support::ObjectFormatter::TimeInspector::FORMAT = T.let(T.unsafe(nil), String)
975
+
976
+ # pkg:gem/rspec-support#lib/rspec/support/object_formatter.rb:195
977
+ class RSpec::Support::ObjectFormatter::UninspectableObjectInspector < ::RSpec::Support::ObjectFormatter::BaseInspector
978
+ # pkg:gem/rspec-support#lib/rspec/support/object_formatter.rb:205
979
+ def inspect; end
980
+
981
+ # pkg:gem/rspec-support#lib/rspec/support/object_formatter.rb:209
982
+ def klass; end
983
+
984
+ # http://stackoverflow.com/a/2818916
985
+ #
986
+ # pkg:gem/rspec-support#lib/rspec/support/object_formatter.rb:214
987
+ def native_object_id; end
988
+
989
+ class << self
990
+ # pkg:gem/rspec-support#lib/rspec/support/object_formatter.rb:198
991
+ def can_inspect?(object); end
992
+ end
993
+ end
994
+
995
+ # pkg:gem/rspec-support#lib/rspec/support/object_formatter.rb:196
996
+ RSpec::Support::ObjectFormatter::UninspectableObjectInspector::OBJECT_ID_FORMAT = T.let(T.unsafe(nil), String)
997
+
998
+ # Provides recursive constant lookup methods useful for
999
+ # constant stubbing.
1000
+ #
1001
+ # pkg:gem/rspec-support#lib/rspec/support/recursive_const_methods.rb:5
1002
+ module RSpec::Support::RecursiveConstMethods
1003
+ # pkg:gem/rspec-support#lib/rspec/support/recursive_const_methods.rb:43
1004
+ def const_defined_on?(mod, const_name); end
1005
+
1006
+ # pkg:gem/rspec-support#lib/rspec/support/recursive_const_methods.rb:51
1007
+ def constants_defined_on(mod); end
1008
+
1009
+ # pkg:gem/rspec-support#lib/rspec/support/recursive_const_methods.rb:47
1010
+ def get_const_defined_on(mod, const_name); end
1011
+
1012
+ # pkg:gem/rspec-support#lib/rspec/support/recursive_const_methods.rb:71
1013
+ def normalize_const_name(const_name); end
1014
+
1015
+ # pkg:gem/rspec-support#lib/rspec/support/recursive_const_methods.rb:62
1016
+ def recursive_const_defined?(const_name); end
1017
+
1018
+ # pkg:gem/rspec-support#lib/rspec/support/recursive_const_methods.rb:56
1019
+ def recursive_const_get(const_name); end
1020
+ end
1021
+
1022
+ # Allows a thread to lock out other threads from a critical section of code,
1023
+ # while allowing the thread with the lock to reenter that section.
1024
+ #
1025
+ # Based on Monitor as of 2.2 -
1026
+ # https://github.com/ruby/ruby/blob/eb7ddaa3a47bf48045d26c72eb0f263a53524ebc/lib/monitor.rb#L9
1027
+ #
1028
+ # Depends on Mutex, but Mutex is only available as part of core since 1.9.1:
1029
+ # exists - http://ruby-doc.org/core-1.9.1/Mutex.html
1030
+ # dne - http://ruby-doc.org/core-1.9.0/Mutex.html
1031
+ #
1032
+ # @private
1033
+ #
1034
+ # pkg:gem/rspec-support#lib/rspec/support/reentrant_mutex.rb:14
1035
+ class RSpec::Support::ReentrantMutex
1036
+ # pkg:gem/rspec-support#lib/rspec/support/reentrant_mutex.rb:15
1037
+ def initialize; end
1038
+
1039
+ # pkg:gem/rspec-support#lib/rspec/support/reentrant_mutex.rb:21
1040
+ def synchronize; end
1041
+
1042
+ private
1043
+
1044
+ # pkg:gem/rspec-support#lib/rspec/support/reentrant_mutex.rb:33
1045
+ def enter; end
1046
+
1047
+ # pkg:gem/rspec-support#lib/rspec/support/reentrant_mutex.rb:38
1048
+ def exit; end
1049
+ end
1050
+
1051
+ # @api private
1052
+ #
1053
+ # Provides query methods for different rubies
1054
+ #
1055
+ # pkg:gem/rspec-support#lib/rspec/support/ruby_features.rb:24
1056
+ module RSpec::Support::Ruby
1057
+ private
1058
+
1059
+ # pkg:gem/rspec-support#lib/rspec/support/ruby_features.rb:27
1060
+ def jruby?; end
1061
+
1062
+ # pkg:gem/rspec-support#lib/rspec/support/ruby_features.rb:35
1063
+ def jruby_9000?; end
1064
+
1065
+ # pkg:gem/rspec-support#lib/rspec/support/ruby_features.rb:31
1066
+ def jruby_version; end
1067
+
1068
+ # pkg:gem/rspec-support#lib/rspec/support/ruby_features.rb:47
1069
+ def mri?; end
1070
+
1071
+ # pkg:gem/rspec-support#lib/rspec/support/ruby_features.rb:43
1072
+ def non_mri?; end
1073
+
1074
+ # pkg:gem/rspec-support#lib/rspec/support/ruby_features.rb:39
1075
+ def rbx?; end
1076
+
1077
+ # pkg:gem/rspec-support#lib/rspec/support/ruby_features.rb:51
1078
+ def truffleruby?; end
1079
+
1080
+ class << self
1081
+ # pkg:gem/rspec-support#lib/rspec/support/ruby_features.rb:27
1082
+ def jruby?; end
1083
+
1084
+ # pkg:gem/rspec-support#lib/rspec/support/ruby_features.rb:35
1085
+ def jruby_9000?; end
1086
+
1087
+ # pkg:gem/rspec-support#lib/rspec/support/ruby_features.rb:31
1088
+ def jruby_version; end
1089
+
1090
+ # pkg:gem/rspec-support#lib/rspec/support/ruby_features.rb:47
1091
+ def mri?; end
1092
+
1093
+ # pkg:gem/rspec-support#lib/rspec/support/ruby_features.rb:43
1094
+ def non_mri?; end
1095
+
1096
+ # pkg:gem/rspec-support#lib/rspec/support/ruby_features.rb:39
1097
+ def rbx?; end
1098
+
1099
+ # pkg:gem/rspec-support#lib/rspec/support/ruby_features.rb:51
1100
+ def truffleruby?; end
1101
+ end
1102
+ end
1103
+
1104
+ # @api private
1105
+ #
1106
+ # Provides query methods for ruby features that differ among
1107
+ # implementations.
1108
+ #
1109
+ # pkg:gem/rspec-support#lib/rspec/support/ruby_features.rb:60
1110
+ module RSpec::Support::RubyFeatures
1111
+ private
1112
+
1113
+ # pkg:gem/rspec-support#lib/rspec/support/ruby_features.rb:83
1114
+ def caller_locations_supported?; end
1115
+
1116
+ # pkg:gem/rspec-support#lib/rspec/support/ruby_features.rb:132
1117
+ def distincts_kw_args_from_positional_hash?; end
1118
+
1119
+ # On JRuby 1.7 `--1.8` mode, `Process.respond_to?(:fork)` returns true,
1120
+ # but when you try to fork, it raises an error:
1121
+ # NotImplementedError: fork is not available on this platform
1122
+ #
1123
+ # When we drop support for JRuby 1.7 and/or Ruby 1.8, we can drop
1124
+ # this special case.
1125
+ #
1126
+ # pkg:gem/rspec-support#lib/rspec/support/ruby_features.rb:74
1127
+ def fork_supported?; end
1128
+
1129
+ # pkg:gem/rspec-support#lib/rspec/support/ruby_features.rb:137
1130
+ def kw_args_supported?; end
1131
+
1132
+ # pkg:gem/rspec-support#lib/rspec/support/ruby_features.rb:193
1133
+ def module_prepends_supported?; end
1134
+
1135
+ # pkg:gem/rspec-support#lib/rspec/support/ruby_features.rb:189
1136
+ def module_refinement_supported?; end
1137
+
1138
+ # pkg:gem/rspec-support#lib/rspec/support/ruby_features.rb:79
1139
+ def optional_and_splat_args_supported?; end
1140
+
1141
+ # pkg:gem/rspec-support#lib/rspec/support/ruby_features.rb:141
1142
+ def required_kw_args_supported?; end
1143
+
1144
+ # pkg:gem/rspec-support#lib/rspec/support/ruby_features.rb:123
1145
+ def ripper_supported?; end
1146
+
1147
+ # pkg:gem/rspec-support#lib/rspec/support/ruby_features.rb:88
1148
+ def supports_exception_cause?; end
1149
+
1150
+ # pkg:gem/rspec-support#lib/rspec/support/ruby_features.rb:145
1151
+ def supports_rebinding_module_methods?; end
1152
+
1153
+ # pkg:gem/rspec-support#lib/rspec/support/ruby_features.rb:98
1154
+ def supports_taint?; end
1155
+
1156
+ class << self
1157
+ # pkg:gem/rspec-support#lib/rspec/support/ruby_features.rb:83
1158
+ def caller_locations_supported?; end
1159
+
1160
+ # pkg:gem/rspec-support#lib/rspec/support/ruby_features.rb:132
1161
+ def distincts_kw_args_from_positional_hash?; end
1162
+
1163
+ # On JRuby 1.7 `--1.8` mode, `Process.respond_to?(:fork)` returns true,
1164
+ # but when you try to fork, it raises an error:
1165
+ # NotImplementedError: fork is not available on this platform
1166
+ #
1167
+ # When we drop support for JRuby 1.7 and/or Ruby 1.8, we can drop
1168
+ # this special case.
1169
+ #
1170
+ # pkg:gem/rspec-support#lib/rspec/support/ruby_features.rb:74
1171
+ def fork_supported?; end
1172
+
1173
+ # pkg:gem/rspec-support#lib/rspec/support/ruby_features.rb:137
1174
+ def kw_args_supported?; end
1175
+
1176
+ # pkg:gem/rspec-support#lib/rspec/support/ruby_features.rb:193
1177
+ def module_prepends_supported?; end
1178
+
1179
+ # pkg:gem/rspec-support#lib/rspec/support/ruby_features.rb:189
1180
+ def module_refinement_supported?; end
1181
+
1182
+ # pkg:gem/rspec-support#lib/rspec/support/ruby_features.rb:79
1183
+ def optional_and_splat_args_supported?; end
1184
+
1185
+ # pkg:gem/rspec-support#lib/rspec/support/ruby_features.rb:141
1186
+ def required_kw_args_supported?; end
1187
+
1188
+ # pkg:gem/rspec-support#lib/rspec/support/ruby_features.rb:123
1189
+ def ripper_supported?; end
1190
+
1191
+ # pkg:gem/rspec-support#lib/rspec/support/ruby_features.rb:88
1192
+ def supports_exception_cause?; end
1193
+
1194
+ # pkg:gem/rspec-support#lib/rspec/support/ruby_features.rb:145
1195
+ def supports_rebinding_module_methods?; end
1196
+
1197
+ # pkg:gem/rspec-support#lib/rspec/support/ruby_features.rb:98
1198
+ def supports_taint?; end
1199
+ end
1200
+ end
1201
+
1202
+ # Figures out wether a given method can accept various arguments.
1203
+ # Surprisingly non-trivial.
1204
+ #
1205
+ # @private
1206
+ #
1207
+ # pkg:gem/rspec-support#lib/rspec/support/method_signature_verifier.rb:385
1208
+ RSpec::Support::StrictSignatureVerifier = RSpec::Support::MethodSignatureVerifier
1209
+
1210
+ # pkg:gem/rspec-support#lib/rspec/support/version.rb:3
1211
+ module RSpec::Support::Version; end
1212
+
1213
+ # pkg:gem/rspec-support#lib/rspec/support/version.rb:4
1214
+ RSpec::Support::Version::STRING = T.let(T.unsafe(nil), String)
1215
+
1216
+ # pkg:gem/rspec-support#lib/rspec/support/warnings.rb:6
1217
+ module RSpec::Support::Warnings
1218
+ # pkg:gem/rspec-support#lib/rspec/support/warnings.rb:7
1219
+ def deprecate(deprecated, options = T.unsafe(nil)); end
1220
+
1221
+ # @private
1222
+ #
1223
+ # Used internally to print deprecation warnings
1224
+ # when rspec-core isn't loaded
1225
+ #
1226
+ # pkg:gem/rspec-support#lib/rspec/support/warnings.rb:15
1227
+ def warn_deprecation(message, options = T.unsafe(nil)); end
1228
+
1229
+ # @private
1230
+ #
1231
+ # Used internally to print longer warnings
1232
+ #
1233
+ # pkg:gem/rspec-support#lib/rspec/support/warnings.rb:29
1234
+ def warn_with(message, options = T.unsafe(nil)); end
1235
+
1236
+ # @private
1237
+ #
1238
+ # Used internally to print warnings
1239
+ #
1240
+ # pkg:gem/rspec-support#lib/rspec/support/warnings.rb:22
1241
+ def warning(text, options = T.unsafe(nil)); end
1242
+ end
1243
+
1244
+ # pkg:gem/rspec-support#lib/rspec/support/with_keywords_when_needed.rb:5
1245
+ module RSpec::Support::WithKeywordsWhenNeeded
1246
+ private
1247
+
1248
+ # Remove this in RSpec 4 in favour of explicitly passed in kwargs where
1249
+ # this is used. Works around a warning in Ruby 2.7
1250
+ #
1251
+ # pkg:gem/rspec-support#lib/rspec/support/with_keywords_when_needed.rb:15
1252
+ def class_exec(klass, *args, **_arg2, &block); end
1253
+
1254
+ class << self
1255
+ # Remove this in RSpec 4 in favour of explicitly passed in kwargs where
1256
+ # this is used. Works around a warning in Ruby 2.7
1257
+ #
1258
+ # pkg:gem/rspec-support#lib/rspec/support/with_keywords_when_needed.rb:15
1259
+ def class_exec(klass, *args, **_arg2, &block); end
1260
+ end
1261
+ end