sorbet-result 1.0.0 → 1.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.ruby-version +1 -1
- data/.standard.yml +6 -0
- data/.tool-versions +1 -1
- data/CHANGELOG.md +10 -0
- data/Gemfile +2 -4
- data/Gemfile.lock +75 -55
- data/README.md +23 -0
- data/Rakefile +3 -5
- data/lib/minitest/result_assertions.rb +48 -0
- data/lib/sorbet-result.rb +1 -5
- data/lib/typed/result.rb +169 -7
- data/sorbet/rbi/gems/.gitattributes +1 -0
- data/sorbet/rbi/gems/erubi@1.12.0.rbi +145 -0
- data/sorbet/rbi/gems/{json@2.6.3.rbi → json@2.7.1.rbi} +80 -60
- data/sorbet/rbi/gems/language_server-protocol@3.17.0.3.rbi +14237 -0
- data/sorbet/rbi/gems/lint_roller@1.1.0.rbi +239 -0
- data/sorbet/rbi/gems/{minitest@5.18.1.rbi → minitest@5.22.2.rbi} +285 -241
- data/sorbet/rbi/gems/{parallel@1.23.0.rbi → parallel@1.24.0.rbi} +8 -1
- data/sorbet/rbi/gems/{parser@3.2.2.3.rbi → parser@3.3.0.5.rbi} +438 -2219
- data/sorbet/rbi/gems/prettier_print@1.2.1.rbi +951 -0
- data/sorbet/rbi/gems/prism@0.24.0.rbi +31040 -0
- data/sorbet/rbi/gems/psych@5.1.2.rbi +1731 -0
- data/sorbet/rbi/gems/{racc@1.7.1.rbi → racc@1.7.3.rbi} +35 -39
- data/sorbet/rbi/gems/{rake@13.0.6.rbi → rake@13.1.0.rbi} +68 -65
- data/sorbet/rbi/gems/{rbi@0.0.16.rbi → rbi@0.1.9.rbi} +712 -714
- data/sorbet/rbi/gems/{regexp_parser@2.8.1.rbi → regexp_parser@2.9.0.rbi} +187 -165
- data/sorbet/rbi/gems/{rexml@3.2.5.rbi → rexml@3.2.6.rbi} +116 -52
- data/sorbet/rbi/gems/{rubocop-ast@1.29.0.rbi → rubocop-ast@1.30.0.rbi} +77 -77
- data/sorbet/rbi/gems/rubocop-performance@1.20.2.rbi +8 -0
- data/sorbet/rbi/gems/rubocop-sorbet@0.7.7.rbi +8 -0
- data/sorbet/rbi/gems/{rubocop@1.52.1.rbi → rubocop@1.60.2.rbi} +3593 -1700
- data/sorbet/rbi/gems/{spoom@1.2.1.rbi → spoom@1.2.4.rbi} +1378 -104
- data/sorbet/rbi/gems/standard-custom@1.0.2.rbi +8 -0
- data/sorbet/rbi/gems/standard-performance@1.3.1.rbi +8 -0
- data/sorbet/rbi/gems/standard-sorbet@0.0.2.rbi +52 -0
- data/sorbet/rbi/gems/standard@1.34.0.rbi +850 -0
- data/sorbet/rbi/gems/stringio@3.1.0.rbi +8 -0
- data/sorbet/rbi/gems/syntax_tree@6.2.0.rbi +23133 -0
- data/sorbet/rbi/gems/{tapioca@0.11.6.rbi → tapioca@0.12.0.rbi} +776 -574
- data/sorbet/rbi/gems/{thor@1.2.2.rbi → thor@1.3.0.rbi} +775 -395
- data/sorbet/rbi/gems/yard-sorbet@0.8.1.rbi +1 -1
- data/sorbet/rbi/gems/yard@0.9.34.rbi +2 -2
- data/sorbet/tapioca/config.yml +3 -12
- data/sorbet/tapioca/require.rb +0 -1
- metadata +41 -34
- data/.rubocop.yml +0 -33
- data/lib/typed/failure.rb +0 -81
- data/lib/typed/success.rb +0 -80
- data/sorbet/rbi/gems/diff-lcs@1.5.0.rbi +0 -1083
- data/sorbet/rbi/gems/irb@1.7.0.rbi +0 -342
- data/sorbet/rbi/gems/rubocop-minitest@0.31.0.rbi +0 -2528
- data/sorbet/rbi/gems/rubocop-rake@0.6.0.rbi +0 -328
- data/sorbet/rbi/gems/rubocop-sorbet@0.7.0.rbi +0 -1043
- data/sorbet/rbi/gems/unparser@0.6.8.rbi +0 -4525
- data/sorbet/rbi/gems/zeitwerk@2.6.8.rbi +0 -986
- /data/sorbet/rbi/gems/{io-console@0.6.0.rbi → io-console@0.7.2.rbi} +0 -0
- /data/sorbet/rbi/gems/{reline@0.3.5.rbi → reline@0.4.2.rbi} +0 -0
- /data/sorbet/rbi/gems/{unicode-display_width@2.4.2.rbi → unicode-display_width@2.5.0.rbi} +0 -0
@@ -0,0 +1,145 @@
|
|
1
|
+
# typed: true
|
2
|
+
|
3
|
+
# DO NOT EDIT MANUALLY
|
4
|
+
# This is an autogenerated file for types exported from the `erubi` gem.
|
5
|
+
# Please instead update this file by running `bin/tapioca gem erubi`.
|
6
|
+
|
7
|
+
# source://erubi//lib/erubi.rb#3
|
8
|
+
module Erubi
|
9
|
+
class << self
|
10
|
+
def h(_arg0); end
|
11
|
+
end
|
12
|
+
end
|
13
|
+
|
14
|
+
# source://erubi//lib/erubi.rb#54
|
15
|
+
class Erubi::Engine
|
16
|
+
# Initialize a new Erubi::Engine. Options:
|
17
|
+
# +:bufval+ :: The value to use for the buffer variable, as a string (default <tt>'::String.new'</tt>).
|
18
|
+
# +:bufvar+ :: The variable name to use for the buffer variable, as a string.
|
19
|
+
# +:chain_appends+ :: Whether to chain <tt><<</t> calls to the buffer variable. Offers better
|
20
|
+
# performance, but can cause issues when the buffer variable is reassigned during
|
21
|
+
# template rendering (default +false+).
|
22
|
+
# +:ensure+ :: Wrap the template in a begin/ensure block restoring the previous value of bufvar.
|
23
|
+
# +:escapefunc+ :: The function to use for escaping, as a string (default: <tt>'::Erubi.h'</tt>).
|
24
|
+
# +:escape+ :: Whether to make <tt><%=</tt> escape by default, and <tt><%==</tt> not escape by default.
|
25
|
+
# +:escape_html+ :: Same as +:escape+, with lower priority.
|
26
|
+
# +:filename+ :: The filename for the template.
|
27
|
+
# the resulting source code. Note this may cause problems if you are wrapping the resulting
|
28
|
+
# source code in other code, because the magic comment only has an effect at the beginning of
|
29
|
+
# the file, and having the magic comment later in the file can trigger warnings.
|
30
|
+
# +:freeze_template_literals+ :: Whether to suffix all literal strings for template code with <tt>.freeze</tt>
|
31
|
+
# (default: +true+ on Ruby 2.1+, +false+ on Ruby 2.0 and older).
|
32
|
+
# Can be set to +false+ on Ruby 2.3+ when frozen string literals are enabled
|
33
|
+
# in order to improve performance.
|
34
|
+
# +:literal_prefix+ :: The prefix to output when using escaped tag delimiters (default <tt>'<%'</tt>).
|
35
|
+
# +:literal_postfix+ :: The postfix to output when using escaped tag delimiters (default <tt>'%>'</tt>).
|
36
|
+
# +:outvar+ :: Same as +:bufvar+, with lower priority.
|
37
|
+
# +:postamble+ :: The postamble for the template, by default returns the resulting source code.
|
38
|
+
# +:preamble+ :: The preamble for the template, by default initializes the buffer variable.
|
39
|
+
# +:regexp+ :: The regexp to use for scanning.
|
40
|
+
# +:src+ :: The initial value to use for the source code, an empty string by default.
|
41
|
+
# +:trim+ :: Whether to trim leading and trailing whitespace, true by default.
|
42
|
+
#
|
43
|
+
# @return [Engine] a new instance of Engine
|
44
|
+
#
|
45
|
+
# source://erubi//lib/erubi.rb#94
|
46
|
+
def initialize(input, properties = T.unsafe(nil)); end
|
47
|
+
|
48
|
+
# The variable name used for the buffer variable.
|
49
|
+
#
|
50
|
+
# source://erubi//lib/erubi.rb#65
|
51
|
+
def bufvar; end
|
52
|
+
|
53
|
+
# The filename of the template, if one was given.
|
54
|
+
#
|
55
|
+
# source://erubi//lib/erubi.rb#62
|
56
|
+
def filename; end
|
57
|
+
|
58
|
+
# The frozen ruby source code generated from the template, which can be evaled.
|
59
|
+
#
|
60
|
+
# source://erubi//lib/erubi.rb#59
|
61
|
+
def src; end
|
62
|
+
|
63
|
+
private
|
64
|
+
|
65
|
+
# Add ruby code to the template
|
66
|
+
#
|
67
|
+
# source://erubi//lib/erubi.rb#226
|
68
|
+
def add_code(code); end
|
69
|
+
|
70
|
+
# Add the given ruby expression result to the template,
|
71
|
+
# escaping it based on the indicator given and escape flag.
|
72
|
+
#
|
73
|
+
# source://erubi//lib/erubi.rb#235
|
74
|
+
def add_expression(indicator, code); end
|
75
|
+
|
76
|
+
# Add the result of Ruby expression to the template
|
77
|
+
#
|
78
|
+
# source://erubi//lib/erubi.rb#244
|
79
|
+
def add_expression_result(code); end
|
80
|
+
|
81
|
+
# Add the escaped result of Ruby expression to the template
|
82
|
+
#
|
83
|
+
# source://erubi//lib/erubi.rb#249
|
84
|
+
def add_expression_result_escaped(code); end
|
85
|
+
|
86
|
+
# Add the given postamble to the src. Can be overridden in subclasses
|
87
|
+
# to make additional changes to src that depend on the current state.
|
88
|
+
#
|
89
|
+
# source://erubi//lib/erubi.rb#255
|
90
|
+
def add_postamble(postamble); end
|
91
|
+
|
92
|
+
# Add raw text to the template. Modifies argument if argument is mutable as a memory optimization.
|
93
|
+
# Must be called with a string, cannot be called with nil (Rails's subclass depends on it).
|
94
|
+
#
|
95
|
+
# source://erubi//lib/erubi.rb#213
|
96
|
+
def add_text(text); end
|
97
|
+
|
98
|
+
# Raise an exception, as the base engine class does not support handling other indicators.
|
99
|
+
#
|
100
|
+
# @raise [ArgumentError]
|
101
|
+
#
|
102
|
+
# source://erubi//lib/erubi.rb#261
|
103
|
+
def handle(indicator, code, tailch, rspace, lspace); end
|
104
|
+
|
105
|
+
# Make sure that any current expression has been terminated.
|
106
|
+
# The default is to terminate all expressions, but when
|
107
|
+
# the chain_appends option is used, expressions may not be
|
108
|
+
# terminated.
|
109
|
+
#
|
110
|
+
# source://erubi//lib/erubi.rb#289
|
111
|
+
def terminate_expression; end
|
112
|
+
|
113
|
+
# Make sure the buffer variable is the target of the next append
|
114
|
+
# before yielding to the block. Mark that the buffer is the target
|
115
|
+
# of the next append after the block executes.
|
116
|
+
#
|
117
|
+
# This method should only be called if the block will result in
|
118
|
+
# code where << will append to the bufvar.
|
119
|
+
#
|
120
|
+
# source://erubi//lib/erubi.rb#271
|
121
|
+
def with_buffer; end
|
122
|
+
end
|
123
|
+
|
124
|
+
# The default regular expression used for scanning.
|
125
|
+
#
|
126
|
+
# source://erubi//lib/erubi.rb#56
|
127
|
+
Erubi::Engine::DEFAULT_REGEXP = T.let(T.unsafe(nil), Regexp)
|
128
|
+
|
129
|
+
# source://erubi//lib/erubi.rb#17
|
130
|
+
Erubi::FREEZE_TEMPLATE_LITERALS = T.let(T.unsafe(nil), TrueClass)
|
131
|
+
|
132
|
+
# source://erubi//lib/erubi.rb#15
|
133
|
+
Erubi::MATCH_METHOD = T.let(T.unsafe(nil), Symbol)
|
134
|
+
|
135
|
+
# source://erubi//lib/erubi.rb#8
|
136
|
+
Erubi::RANGE_FIRST = T.let(T.unsafe(nil), Integer)
|
137
|
+
|
138
|
+
# source://erubi//lib/erubi.rb#9
|
139
|
+
Erubi::RANGE_LAST = T.let(T.unsafe(nil), Integer)
|
140
|
+
|
141
|
+
# source://erubi//lib/erubi.rb#16
|
142
|
+
Erubi::SKIP_DEFINED_FOR_INSTANCE_VARIABLE = T.let(T.unsafe(nil), TrueClass)
|
143
|
+
|
144
|
+
# source://erubi//lib/erubi.rb#4
|
145
|
+
Erubi::VERSION = T.let(T.unsafe(nil), String)
|
@@ -1,4 +1,4 @@
|
|
1
|
-
# typed:
|
1
|
+
# typed: false
|
2
2
|
|
3
3
|
# DO NOT EDIT MANUALLY
|
4
4
|
# This is an autogenerated file for types exported from the `json` gem.
|
@@ -13,7 +13,7 @@ class Class < ::Module
|
|
13
13
|
#
|
14
14
|
# @return [Boolean]
|
15
15
|
#
|
16
|
-
# source://json//json/common.rb#
|
16
|
+
# source://json//json/common.rb#694
|
17
17
|
def json_creatable?; end
|
18
18
|
end
|
19
19
|
|
@@ -300,6 +300,15 @@ end
|
|
300
300
|
# # Raises JSON::NestingError (nesting of 2 is too deep):
|
301
301
|
# JSON.generate(obj, max_nesting: 2)
|
302
302
|
#
|
303
|
+
# ====== Escaping Options
|
304
|
+
#
|
305
|
+
# Options +script_safe+ (boolean) specifies wether <tt>'\u2028'</tt>, <tt>'\u2029'</tt>
|
306
|
+
# and <tt>'/'</tt> should be escaped as to make the JSON object safe to interpolate in script
|
307
|
+
# tags.
|
308
|
+
#
|
309
|
+
# Options +ascii_only+ (boolean) specifies wether all characters outside the ASCII range
|
310
|
+
# should be escaped.
|
311
|
+
#
|
303
312
|
# ====== Output Options
|
304
313
|
#
|
305
314
|
# The default formatting options generate the most compact
|
@@ -617,8 +626,8 @@ module JSON
|
|
617
626
|
# Output:
|
618
627
|
# {"foo":[0,1],"bar":{"baz":2,"bat":3},"bam":"bad"}
|
619
628
|
#
|
620
|
-
# source://json//json/common.rb#
|
621
|
-
def dump(obj, anIO = T.unsafe(nil), limit = T.unsafe(nil)); end
|
629
|
+
# source://json//json/common.rb#614
|
630
|
+
def dump(obj, anIO = T.unsafe(nil), limit = T.unsafe(nil), kwargs = T.unsafe(nil)); end
|
622
631
|
|
623
632
|
# :call-seq:
|
624
633
|
# JSON.fast_generate(obj, opts) -> new_string
|
@@ -634,13 +643,13 @@ module JSON
|
|
634
643
|
# # Raises SystemStackError (stack level too deep):
|
635
644
|
# JSON.fast_generate(a)
|
636
645
|
#
|
637
|
-
# source://json//json/common.rb#
|
646
|
+
# source://json//json/common.rb#328
|
638
647
|
def fast_generate(obj, opts = T.unsafe(nil)); end
|
639
648
|
|
640
649
|
# :stopdoc:
|
641
650
|
# I want to deprecate these later, so I'll first be silent about them, and later delete them.
|
642
651
|
#
|
643
|
-
# source://json//json/common.rb#
|
652
|
+
# source://json//json/common.rb#328
|
644
653
|
def fast_unparse(obj, opts = T.unsafe(nil)); end
|
645
654
|
|
646
655
|
# :call-seq:
|
@@ -679,7 +688,7 @@ module JSON
|
|
679
688
|
# # Raises JSON::NestingError (nesting of 100 is too deep):
|
680
689
|
# JSON.generate(a)
|
681
690
|
#
|
682
|
-
# source://json//json/common.rb#
|
691
|
+
# source://json//json/common.rb#299
|
683
692
|
def generate(obj, opts = T.unsafe(nil)); end
|
684
693
|
|
685
694
|
# :call-seq:
|
@@ -810,7 +819,7 @@ module JSON
|
|
810
819
|
# #<Admin:0x00000000064c41f8
|
811
820
|
# @attributes={"type"=>"Admin", "password"=>"0wn3d"}>}
|
812
821
|
#
|
813
|
-
# source://json//json/common.rb#
|
822
|
+
# source://json//json/common.rb#540
|
814
823
|
def load(source, proc = T.unsafe(nil), options = T.unsafe(nil)); end
|
815
824
|
|
816
825
|
# :call-seq:
|
@@ -821,7 +830,7 @@ module JSON
|
|
821
830
|
#
|
822
831
|
# See method #parse.
|
823
832
|
#
|
824
|
-
# source://json//json/common.rb#
|
833
|
+
# source://json//json/common.rb#248
|
825
834
|
def load_file(filespec, opts = T.unsafe(nil)); end
|
826
835
|
|
827
836
|
# :call-seq:
|
@@ -832,9 +841,12 @@ module JSON
|
|
832
841
|
#
|
833
842
|
# See method #parse!
|
834
843
|
#
|
835
|
-
# source://json//json/common.rb#
|
844
|
+
# source://json//json/common.rb#259
|
836
845
|
def load_file!(filespec, opts = T.unsafe(nil)); end
|
837
846
|
|
847
|
+
# source://json//json/common.rb#642
|
848
|
+
def merge_dump_options(opts, strict: T.unsafe(nil)); end
|
849
|
+
|
838
850
|
# :call-seq:
|
839
851
|
# JSON.parse(source, opts) -> object
|
840
852
|
#
|
@@ -883,7 +895,7 @@ module JSON
|
|
883
895
|
# # Raises JSON::ParserError (783: unexpected token at ''):
|
884
896
|
# JSON.parse('')
|
885
897
|
#
|
886
|
-
# source://json//json/common.rb#
|
898
|
+
# source://json//json/common.rb#218
|
887
899
|
def parse(source, opts = T.unsafe(nil)); end
|
888
900
|
|
889
901
|
# :call-seq:
|
@@ -898,7 +910,7 @@ module JSON
|
|
898
910
|
# which disables checking for nesting depth.
|
899
911
|
# - Option +allow_nan+, if not provided, defaults to +true+.
|
900
912
|
#
|
901
|
-
# source://json//json/common.rb#
|
913
|
+
# source://json//json/common.rb#233
|
902
914
|
def parse!(source, opts = T.unsafe(nil)); end
|
903
915
|
|
904
916
|
# :call-seq:
|
@@ -931,28 +943,28 @@ module JSON
|
|
931
943
|
# }
|
932
944
|
# }
|
933
945
|
#
|
934
|
-
# source://json//json/common.rb#
|
946
|
+
# source://json//json/common.rb#373
|
935
947
|
def pretty_generate(obj, opts = T.unsafe(nil)); end
|
936
948
|
|
937
949
|
# :stopdoc:
|
938
950
|
# I want to deprecate these later, so I'll first be silent about them, and later delete them.
|
939
951
|
#
|
940
|
-
# source://json//json/common.rb#
|
952
|
+
# source://json//json/common.rb#373
|
941
953
|
def pretty_unparse(obj, opts = T.unsafe(nil)); end
|
942
954
|
|
943
955
|
# Recursively calls passed _Proc_ if the parsed data structure is an _Array_ or _Hash_
|
944
956
|
#
|
945
|
-
# source://json//json/common.rb#
|
957
|
+
# source://json//json/common.rb#558
|
946
958
|
def recurse_proc(result, &proc); end
|
947
959
|
|
948
|
-
# source://json//json/common.rb#
|
960
|
+
# source://json//json/common.rb#540
|
949
961
|
def restore(source, proc = T.unsafe(nil), options = T.unsafe(nil)); end
|
950
962
|
|
951
963
|
# :stopdoc:
|
952
964
|
# I want to deprecate these later, so I'll first be silent about them, and
|
953
965
|
# later delete them.
|
954
966
|
#
|
955
|
-
# source://json//json/common.rb#
|
967
|
+
# source://json//json/common.rb#299
|
956
968
|
def unparse(obj, opts = T.unsafe(nil)); end
|
957
969
|
|
958
970
|
class << self
|
@@ -968,26 +980,26 @@ module JSON
|
|
968
980
|
# ruby = [0, 1, nil]
|
969
981
|
# JSON[ruby] # => '[0,1,null]'
|
970
982
|
#
|
971
|
-
# source://json//json/common.rb#
|
983
|
+
# source://json//json/common.rb#21
|
972
984
|
def [](object, opts = T.unsafe(nil)); end
|
973
985
|
|
974
|
-
# source://json//json/common.rb#
|
986
|
+
# source://json//json/common.rb#84
|
975
987
|
def create_fast_state; end
|
976
988
|
|
977
989
|
# Returns the current create identifier.
|
978
990
|
# See also JSON.create_id=.
|
979
991
|
#
|
980
|
-
# source://json//json/common.rb#
|
992
|
+
# source://json//json/common.rb#129
|
981
993
|
def create_id; end
|
982
994
|
|
983
995
|
# Sets create identifier, which is used to decide if the _json_create_
|
984
996
|
# hook of a class should be called; initial value is +json_class+:
|
985
997
|
# JSON.create_id # => 'json_class'
|
986
998
|
#
|
987
|
-
# source://json//json/common.rb#
|
999
|
+
# source://json//json/common.rb#123
|
988
1000
|
def create_id=(new_value); end
|
989
1001
|
|
990
|
-
# source://json//json/common.rb#
|
1002
|
+
# source://json//json/common.rb#94
|
991
1003
|
def create_pretty_state; end
|
992
1004
|
|
993
1005
|
# Return the constant located at _path_. The format of _path_ has to be
|
@@ -995,7 +1007,7 @@ module JSON
|
|
995
1007
|
# level (absolute namespace path?). If there doesn't exist a constant at
|
996
1008
|
# the given path, an ArgumentError is raised.
|
997
1009
|
#
|
998
|
-
# source://json//json/common.rb#
|
1010
|
+
# source://json//json/common.rb#45
|
999
1011
|
def deep_const_get(path); end
|
1000
1012
|
|
1001
1013
|
# :call-seq:
|
@@ -1026,23 +1038,23 @@ module JSON
|
|
1026
1038
|
# Output:
|
1027
1039
|
# {"foo":[0,1],"bar":{"baz":2,"bat":3},"bam":"bad"}
|
1028
1040
|
#
|
1029
|
-
# source://json//json/common.rb#
|
1030
|
-
def dump(obj, anIO = T.unsafe(nil), limit = T.unsafe(nil)); end
|
1041
|
+
# source://json//json/common.rb#614
|
1042
|
+
def dump(obj, anIO = T.unsafe(nil), limit = T.unsafe(nil), kwargs = T.unsafe(nil)); end
|
1031
1043
|
|
1032
1044
|
# Sets or returns the default options for the JSON.dump method.
|
1033
1045
|
# Initially:
|
1034
1046
|
# opts = JSON.dump_default_options
|
1035
|
-
# opts # => {:max_nesting=>false, :allow_nan=>true, :
|
1047
|
+
# opts # => {:max_nesting=>false, :allow_nan=>true, :script_safe=>false}
|
1036
1048
|
#
|
1037
|
-
# source://json//json/common.rb#
|
1049
|
+
# source://json//json/common.rb#579
|
1038
1050
|
def dump_default_options; end
|
1039
1051
|
|
1040
1052
|
# Sets or returns the default options for the JSON.dump method.
|
1041
1053
|
# Initially:
|
1042
1054
|
# opts = JSON.dump_default_options
|
1043
|
-
# opts # => {:max_nesting=>false, :allow_nan=>true, :
|
1055
|
+
# opts # => {:max_nesting=>false, :allow_nan=>true, :script_safe=>false}
|
1044
1056
|
#
|
1045
|
-
# source://json//json/common.rb#
|
1057
|
+
# source://json//json/common.rb#579
|
1046
1058
|
def dump_default_options=(_arg0); end
|
1047
1059
|
|
1048
1060
|
# :call-seq:
|
@@ -1059,13 +1071,13 @@ module JSON
|
|
1059
1071
|
# # Raises SystemStackError (stack level too deep):
|
1060
1072
|
# JSON.fast_generate(a)
|
1061
1073
|
#
|
1062
|
-
# source://json//json/common.rb#
|
1074
|
+
# source://json//json/common.rb#328
|
1063
1075
|
def fast_generate(obj, opts = T.unsafe(nil)); end
|
1064
1076
|
|
1065
1077
|
# :stopdoc:
|
1066
1078
|
# I want to deprecate these later, so I'll first be silent about them, and later delete them.
|
1067
1079
|
#
|
1068
|
-
# source://json//json/common.rb#
|
1080
|
+
# source://json//json/common.rb#328
|
1069
1081
|
def fast_unparse(obj, opts = T.unsafe(nil)); end
|
1070
1082
|
|
1071
1083
|
# :call-seq:
|
@@ -1104,24 +1116,24 @@ module JSON
|
|
1104
1116
|
# # Raises JSON::NestingError (nesting of 100 is too deep):
|
1105
1117
|
# JSON.generate(a)
|
1106
1118
|
#
|
1107
|
-
# source://json//json/common.rb#
|
1119
|
+
# source://json//json/common.rb#299
|
1108
1120
|
def generate(obj, opts = T.unsafe(nil)); end
|
1109
1121
|
|
1110
1122
|
# Returns the JSON generator module that is used by JSON. This is
|
1111
1123
|
# either JSON::Ext::Generator or JSON::Pure::Generator:
|
1112
1124
|
# JSON.generator # => JSON::Ext::Generator
|
1113
1125
|
#
|
1114
|
-
# source://json//json/common.rb#
|
1126
|
+
# source://json//json/common.rb#106
|
1115
1127
|
def generator; end
|
1116
1128
|
|
1117
1129
|
# Set the module _generator_ to be used by JSON.
|
1118
1130
|
#
|
1119
|
-
# source://json//json/common.rb#
|
1131
|
+
# source://json//json/common.rb#61
|
1120
1132
|
def generator=(generator); end
|
1121
1133
|
|
1122
1134
|
# Encodes string using String.encode.
|
1123
1135
|
#
|
1124
|
-
# source://json//json/common.rb#
|
1136
|
+
# source://json//json/common.rb#638
|
1125
1137
|
def iconv(to, from, string); end
|
1126
1138
|
|
1127
1139
|
# :call-seq:
|
@@ -1252,7 +1264,7 @@ module JSON
|
|
1252
1264
|
# #<Admin:0x00000000064c41f8
|
1253
1265
|
# @attributes={"type"=>"Admin", "password"=>"0wn3d"}>}
|
1254
1266
|
#
|
1255
|
-
# source://json//json/common.rb#
|
1267
|
+
# source://json//json/common.rb#540
|
1256
1268
|
def load(source, proc = T.unsafe(nil), options = T.unsafe(nil)); end
|
1257
1269
|
|
1258
1270
|
# Sets or returns default options for the JSON.load method.
|
@@ -1260,7 +1272,7 @@ module JSON
|
|
1260
1272
|
# opts = JSON.load_default_options
|
1261
1273
|
# opts # => {:max_nesting=>false, :allow_nan=>true, :allow_blank=>true, :create_additions=>true}
|
1262
1274
|
#
|
1263
|
-
# source://json//json/common.rb#
|
1275
|
+
# source://json//json/common.rb#403
|
1264
1276
|
def load_default_options; end
|
1265
1277
|
|
1266
1278
|
# Sets or returns default options for the JSON.load method.
|
@@ -1268,7 +1280,7 @@ module JSON
|
|
1268
1280
|
# opts = JSON.load_default_options
|
1269
1281
|
# opts # => {:max_nesting=>false, :allow_nan=>true, :allow_blank=>true, :create_additions=>true}
|
1270
1282
|
#
|
1271
|
-
# source://json//json/common.rb#
|
1283
|
+
# source://json//json/common.rb#403
|
1272
1284
|
def load_default_options=(_arg0); end
|
1273
1285
|
|
1274
1286
|
# :call-seq:
|
@@ -1279,7 +1291,7 @@ module JSON
|
|
1279
1291
|
#
|
1280
1292
|
# See method #parse.
|
1281
1293
|
#
|
1282
|
-
# source://json//json/common.rb#
|
1294
|
+
# source://json//json/common.rb#248
|
1283
1295
|
def load_file(filespec, opts = T.unsafe(nil)); end
|
1284
1296
|
|
1285
1297
|
# :call-seq:
|
@@ -1290,7 +1302,7 @@ module JSON
|
|
1290
1302
|
#
|
1291
1303
|
# See method #parse!
|
1292
1304
|
#
|
1293
|
-
# source://json//json/common.rb#
|
1305
|
+
# source://json//json/common.rb#259
|
1294
1306
|
def load_file!(filespec, opts = T.unsafe(nil)); end
|
1295
1307
|
|
1296
1308
|
# :call-seq:
|
@@ -1341,7 +1353,7 @@ module JSON
|
|
1341
1353
|
# # Raises JSON::ParserError (783: unexpected token at ''):
|
1342
1354
|
# JSON.parse('')
|
1343
1355
|
#
|
1344
|
-
# source://json//json/common.rb#
|
1356
|
+
# source://json//json/common.rb#218
|
1345
1357
|
def parse(source, opts = T.unsafe(nil)); end
|
1346
1358
|
|
1347
1359
|
# :call-seq:
|
@@ -1356,19 +1368,19 @@ module JSON
|
|
1356
1368
|
# which disables checking for nesting depth.
|
1357
1369
|
# - Option +allow_nan+, if not provided, defaults to +true+.
|
1358
1370
|
#
|
1359
|
-
# source://json//json/common.rb#
|
1371
|
+
# source://json//json/common.rb#233
|
1360
1372
|
def parse!(source, opts = T.unsafe(nil)); end
|
1361
1373
|
|
1362
1374
|
# Returns the JSON parser class that is used by JSON. This is either
|
1363
1375
|
# JSON::Ext::Parser or JSON::Pure::Parser:
|
1364
1376
|
# JSON.parser # => JSON::Ext::Parser
|
1365
1377
|
#
|
1366
|
-
# source://json//json/common.rb#
|
1378
|
+
# source://json//json/common.rb#32
|
1367
1379
|
def parser; end
|
1368
1380
|
|
1369
1381
|
# Set the JSON parser class _parser_ to be used by JSON.
|
1370
1382
|
#
|
1371
|
-
# source://json//json/common.rb#
|
1383
|
+
# source://json//json/common.rb#35
|
1372
1384
|
def parser=(parser); end
|
1373
1385
|
|
1374
1386
|
# :call-seq:
|
@@ -1401,50 +1413,55 @@ module JSON
|
|
1401
1413
|
# }
|
1402
1414
|
# }
|
1403
1415
|
#
|
1404
|
-
# source://json//json/common.rb#
|
1416
|
+
# source://json//json/common.rb#373
|
1405
1417
|
def pretty_generate(obj, opts = T.unsafe(nil)); end
|
1406
1418
|
|
1407
1419
|
# :stopdoc:
|
1408
1420
|
# I want to deprecate these later, so I'll first be silent about them, and later delete them.
|
1409
1421
|
#
|
1410
|
-
# source://json//json/common.rb#
|
1422
|
+
# source://json//json/common.rb#373
|
1411
1423
|
def pretty_unparse(obj, opts = T.unsafe(nil)); end
|
1412
1424
|
|
1413
1425
|
# Recursively calls passed _Proc_ if the parsed data structure is an _Array_ or _Hash_
|
1414
1426
|
#
|
1415
|
-
# source://json//json/common.rb#
|
1427
|
+
# source://json//json/common.rb#558
|
1416
1428
|
def recurse_proc(result, &proc); end
|
1417
1429
|
|
1418
|
-
# source://json//json/common.rb#
|
1430
|
+
# source://json//json/common.rb#540
|
1419
1431
|
def restore(source, proc = T.unsafe(nil), options = T.unsafe(nil)); end
|
1420
1432
|
|
1421
1433
|
# Sets or Returns the JSON generator state class that is used by JSON. This is
|
1422
1434
|
# either JSON::Ext::Generator::State or JSON::Pure::Generator::State:
|
1423
1435
|
# JSON.state # => JSON::Ext::Generator::State
|
1424
1436
|
#
|
1425
|
-
# source://json//json/common.rb#
|
1437
|
+
# source://json//json/common.rb#111
|
1426
1438
|
def state; end
|
1427
1439
|
|
1428
1440
|
# Sets or Returns the JSON generator state class that is used by JSON. This is
|
1429
1441
|
# either JSON::Ext::Generator::State or JSON::Pure::Generator::State:
|
1430
1442
|
# JSON.state # => JSON::Ext::Generator::State
|
1431
1443
|
#
|
1432
|
-
# source://json//json/common.rb#
|
1444
|
+
# source://json//json/common.rb#111
|
1433
1445
|
def state=(_arg0); end
|
1434
1446
|
|
1435
1447
|
# :stopdoc:
|
1436
1448
|
# I want to deprecate these later, so I'll first be silent about them, and
|
1437
1449
|
# later delete them.
|
1438
1450
|
#
|
1439
|
-
# source://json//json/common.rb#
|
1451
|
+
# source://json//json/common.rb#299
|
1440
1452
|
def unparse(obj, opts = T.unsafe(nil)); end
|
1453
|
+
|
1454
|
+
private
|
1455
|
+
|
1456
|
+
# source://json//json/common.rb#642
|
1457
|
+
def merge_dump_options(opts, strict: T.unsafe(nil)); end
|
1441
1458
|
end
|
1442
1459
|
end
|
1443
1460
|
|
1444
|
-
# source://json//json/common.rb#
|
1461
|
+
# source://json//json/common.rb#117
|
1445
1462
|
JSON::CREATE_ID_TLS_KEY = T.let(T.unsafe(nil), String)
|
1446
1463
|
|
1447
|
-
# source://json//json/common.rb#
|
1464
|
+
# source://json//json/common.rb#114
|
1448
1465
|
JSON::DEFAULT_CREATE_ID = T.let(T.unsafe(nil), String)
|
1449
1466
|
|
1450
1467
|
class JSON::GenericObject < ::OpenStruct
|
@@ -1490,20 +1507,23 @@ end
|
|
1490
1507
|
# The base exception for JSON errors.
|
1491
1508
|
class JSON::JSONError < ::StandardError
|
1492
1509
|
class << self
|
1493
|
-
# source://json//json/common.rb#
|
1510
|
+
# source://json//json/common.rb#141
|
1494
1511
|
def wrap(exception); end
|
1495
1512
|
end
|
1496
1513
|
end
|
1497
1514
|
|
1498
|
-
# source://json//json/common.rb#
|
1515
|
+
# source://json//json/common.rb#6
|
1516
|
+
JSON::NOT_SET = T.let(T.unsafe(nil), Object)
|
1517
|
+
|
1518
|
+
# source://json//json/common.rb#38
|
1499
1519
|
JSON::Parser = JSON::Ext::Parser
|
1500
1520
|
|
1501
|
-
# source://json//json/common.rb#
|
1521
|
+
# source://json//json/common.rb#76
|
1502
1522
|
JSON::State = JSON::Ext::Generator::State
|
1503
1523
|
|
1504
1524
|
# For backwards compatibility
|
1505
1525
|
#
|
1506
|
-
# source://json//json/common.rb#
|
1526
|
+
# source://json//json/common.rb#162
|
1507
1527
|
JSON::UnparserError = JSON::GeneratorError
|
1508
1528
|
|
1509
1529
|
module Kernel
|
@@ -1516,18 +1536,18 @@ module Kernel
|
|
1516
1536
|
# The _opts_ argument is passed through to generate/parse respectively. See
|
1517
1537
|
# generate and parse for their documentation.
|
1518
1538
|
#
|
1519
|
-
# source://json//json/common.rb#
|
1539
|
+
# source://json//json/common.rb#679
|
1520
1540
|
def JSON(object, *args); end
|
1521
1541
|
|
1522
1542
|
# Outputs _objs_ to STDOUT as JSON strings in the shortest form, that is in
|
1523
1543
|
# one line.
|
1524
1544
|
#
|
1525
|
-
# source://json//json/common.rb#
|
1545
|
+
# source://json//json/common.rb#657
|
1526
1546
|
def j(*objs); end
|
1527
1547
|
|
1528
1548
|
# Outputs _objs_ to STDOUT as JSON strings in a pretty format, with
|
1529
1549
|
# indentation and over many lines.
|
1530
1550
|
#
|
1531
|
-
# source://json//json/common.rb#
|
1551
|
+
# source://json//json/common.rb#666
|
1532
1552
|
def jj(*objs); end
|
1533
1553
|
end
|