rbs 3.1.3 → 3.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/ruby.yml +0 -6
- data/CHANGELOG.md +82 -0
- data/Gemfile +0 -6
- data/Gemfile.lock +12 -21
- data/README.md +1 -1
- data/Rakefile +45 -1
- data/Steepfile +3 -3
- data/core/array.rbs +0 -8
- data/core/binding.rbs +7 -69
- data/core/builtin.rbs +33 -8
- data/core/constants.rbs +13 -5
- data/core/dir.rbs +25 -25
- data/core/errno.rbs +474 -590
- data/core/exception.rbs +1 -1
- data/core/global_variables.rbs +27 -27
- data/core/io.rbs +163 -172
- data/core/kernel.rbs +58 -38
- data/core/module.rbs +34 -32
- data/core/object.rbs +3 -7
- data/core/string_io.rbs +9 -0
- data/core/thread.rbs +25 -1
- data/core/time.rbs +3 -3
- data/core/warning.rbs +3 -1
- data/docs/CONTRIBUTING.md +1 -1
- data/docs/rbs_by_example.md +16 -35
- data/docs/repo.md +1 -1
- data/docs/sigs.md +7 -7
- data/docs/stdlib.md +2 -3
- data/docs/syntax.md +40 -40
- data/lib/rbs/cli.rb +15 -4
- data/lib/rbs/collection/config/lockfile_generator.rb +6 -2
- data/lib/rbs/collection/installer.rb +5 -2
- data/lib/rbs/collection/sources/stdlib.rb +5 -1
- data/lib/rbs/errors.rb +8 -1
- data/lib/rbs/file_finder.rb +1 -1
- data/lib/rbs/prototype/rb.rb +64 -6
- data/lib/rbs/prototype/rbi.rb +2 -6
- data/lib/rbs/prototype/runtime.rb +29 -8
- data/lib/rbs/subtractor.rb +17 -0
- data/lib/rbs/type_name.rb +4 -4
- data/lib/rbs/version.rb +1 -1
- data/rbs.gemspec +1 -1
- data/schema/decls.json +1 -1
- data/sig/errors.rbs +54 -0
- data/sig/parser.rbs +2 -2
- data/sig/prototype/rb.rbs +9 -1
- data/sig/subtractor.rbs +4 -0
- data/stdlib/logger/0/logger.rbs +1 -1
- data/stdlib/observable/0/observable.rbs +219 -0
- data/stdlib/uri/0/common.rbs +24 -0
- data/stdlib/zlib/0/buf_error.rbs +79 -0
- data/stdlib/zlib/0/data_error.rbs +79 -0
- data/stdlib/zlib/0/deflate.rbs +276 -0
- data/stdlib/zlib/0/error.rbs +89 -0
- data/stdlib/zlib/0/gzip_file/crc_error.rbs +115 -0
- data/stdlib/zlib/0/gzip_file/error.rbs +128 -0
- data/stdlib/zlib/0/gzip_file/length_error.rbs +115 -0
- data/stdlib/zlib/0/gzip_file/no_footer.rbs +114 -0
- data/stdlib/zlib/0/gzip_file.rbs +228 -0
- data/stdlib/zlib/0/gzip_reader.rbs +362 -0
- data/stdlib/zlib/0/gzip_writer.rbs +237 -0
- data/stdlib/zlib/0/inflate.rbs +249 -0
- data/stdlib/zlib/0/mem_error.rbs +79 -0
- data/stdlib/zlib/0/need_dict.rbs +82 -0
- data/stdlib/zlib/0/stream_end.rbs +80 -0
- data/stdlib/zlib/0/stream_error.rbs +80 -0
- data/stdlib/zlib/0/version_error.rbs +80 -0
- data/stdlib/zlib/0/zstream.rbs +270 -0
- metadata +22 -6
- data/stdlib/prime/0/integer-extension.rbs +0 -41
- data/stdlib/prime/0/manifest.yaml +0 -2
- data/stdlib/prime/0/prime.rbs +0 -372
data/core/exception.rbs
CHANGED
@@ -230,7 +230,7 @@ class Exception < Object
|
|
230
230
|
# sequences to express essential information; the message should be readable
|
231
231
|
# even if all escape sequences are ignored.
|
232
232
|
#
|
233
|
-
def detailed_message: () -> String
|
233
|
+
def detailed_message: (?highlight: boolish, **untyped) -> String
|
234
234
|
|
235
235
|
# <!--
|
236
236
|
# rdoc-file=error.c
|
data/core/global_variables.rbs
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
# The Exception object set by Kernel#raise.
|
2
|
-
$!: Exception
|
2
|
+
$!: Exception?
|
3
3
|
|
4
4
|
# The array contains the module names loaded by require.
|
5
5
|
$": Array[String]
|
@@ -8,22 +8,22 @@ $": Array[String]
|
|
8
8
|
$$: Integer
|
9
9
|
|
10
10
|
# The string matched by the last successful match.
|
11
|
-
$&: String
|
11
|
+
$&: String?
|
12
12
|
|
13
13
|
# The string to the right of the last successful match.
|
14
|
-
$': String
|
14
|
+
$': String?
|
15
15
|
|
16
16
|
# The same as ARGV.
|
17
17
|
$*: Array[String]
|
18
18
|
|
19
19
|
# The highest group matched by the last successful match.
|
20
|
-
$+: String
|
20
|
+
$+: String?
|
21
21
|
|
22
22
|
# The output field separator for Kernel#print and Array#join. Non-nil $, will be deprecated.
|
23
|
-
$,: String
|
23
|
+
$,: String?
|
24
24
|
|
25
25
|
# The input record separator, newline by default.
|
26
|
-
$-0: String
|
26
|
+
$-0: String?
|
27
27
|
|
28
28
|
# The default separator for String#split. Non-nil $; will be deprecated.
|
29
29
|
$-F: Regexp | String | nil
|
@@ -45,7 +45,7 @@ $-a: bool
|
|
45
45
|
# backtrace). Setting this to a true value enables debug output as
|
46
46
|
# if <tt>-d</tt> were given on the command line. Setting this to a false
|
47
47
|
# value disables debug output.
|
48
|
-
$-d:
|
48
|
+
$-d: boolish
|
49
49
|
|
50
50
|
# In in-place-edit mode, this variable holds the extension, otherwise +nil+.
|
51
51
|
$-i: String?
|
@@ -60,49 +60,49 @@ $-p: bool
|
|
60
60
|
# Setting this to a true value enables warnings as if <tt>-w</tt> or <tt>-v</tt> were given
|
61
61
|
# on the command line. Setting this to +nil+ disables warnings,
|
62
62
|
# including from Kernel#warn.
|
63
|
-
$-v: bool
|
63
|
+
$-v: bool?
|
64
64
|
|
65
65
|
# The verbose flag, which is set by the <tt>-w</tt> or <tt>-v</tt> switch.
|
66
66
|
# Setting this to a true value enables warnings as if <tt>-w</tt> or <tt>-v</tt> were given
|
67
67
|
# on the command line. Setting this to +nil+ disables warnings,
|
68
68
|
# including from Kernel#warn.
|
69
|
-
$-w: bool
|
69
|
+
$-w: bool?
|
70
70
|
|
71
71
|
# The current input line number of the last file that was read.
|
72
72
|
$.: Integer
|
73
73
|
|
74
74
|
# The input record separator, newline by default. Aliased to $-0.
|
75
|
-
$/: String
|
75
|
+
$/: String?
|
76
76
|
|
77
77
|
# Contains the name of the script being executed. May be assignable.
|
78
78
|
$0: String
|
79
79
|
|
80
80
|
# The Nth group of the last successful match. May be > 1.
|
81
|
-
$1: String
|
81
|
+
$1: String?
|
82
82
|
|
83
83
|
# The Nth group of the last successful match. May be > 1.
|
84
|
-
$2: String
|
84
|
+
$2: String?
|
85
85
|
|
86
86
|
# The Nth group of the last successful match. May be > 1.
|
87
|
-
$3: String
|
87
|
+
$3: String?
|
88
88
|
|
89
89
|
# The Nth group of the last successful match. May be > 1.
|
90
|
-
$4: String
|
90
|
+
$4: String?
|
91
91
|
|
92
92
|
# The Nth group of the last successful match. May be > 1.
|
93
|
-
$5: String
|
93
|
+
$5: String?
|
94
94
|
|
95
95
|
# The Nth group of the last successful match. May be > 1.
|
96
|
-
$6: String
|
96
|
+
$6: String?
|
97
97
|
|
98
98
|
# The Nth group of the last successful match. May be > 1.
|
99
|
-
$7: String
|
99
|
+
$7: String?
|
100
100
|
|
101
101
|
# The Nth group of the last successful match. May be > 1.
|
102
|
-
$8: String
|
102
|
+
$8: String?
|
103
103
|
|
104
104
|
# The Nth group of the last successful match. May be > 1.
|
105
|
-
$9: String
|
105
|
+
$9: String?
|
106
106
|
|
107
107
|
# Load path for searching Ruby scripts and extension libraries used
|
108
108
|
# by Kernel#load and Kernel#require.
|
@@ -124,17 +124,17 @@ $=: bool
|
|
124
124
|
$>: IO
|
125
125
|
|
126
126
|
# The status of the last executed child process (thread-local).
|
127
|
-
$?: Process::Status
|
127
|
+
$?: Process::Status?
|
128
128
|
|
129
129
|
# The same as <code>$!.backtrace</code>.
|
130
|
-
$@: Array[String]
|
130
|
+
$@: Array[String]?
|
131
131
|
|
132
132
|
# The debug flag, which is set by the <tt>-d</tt> switch. Enabling debug
|
133
133
|
# output prints each exception raised to $stderr (but not its
|
134
134
|
# backtrace). Setting this to a true value enables debug output as
|
135
135
|
# if <tt>-d</tt> were given on the command line. Setting this to a false
|
136
136
|
# value disables debug output. Aliased to $-d.
|
137
|
-
$DEBUG:
|
137
|
+
$DEBUG: boolish
|
138
138
|
|
139
139
|
# Current input filename from ARGF. Same as ARGF.filename.
|
140
140
|
$FILENAME: String
|
@@ -160,16 +160,16 @@ $PROGRAM_NAME: String
|
|
160
160
|
# Setting this to a true value enables warnings as if <tt>-w</tt> or <tt>-v</tt> were given
|
161
161
|
# on the command line. Setting this to +nil+ disables warnings,
|
162
162
|
# including from Kernel#warn. Aliased to $-v and $-w.
|
163
|
-
$VERBOSE: bool
|
163
|
+
$VERBOSE: bool?
|
164
164
|
|
165
165
|
# The output record separator for Kernel#print and IO#write. Default is +nil+.
|
166
|
-
$\: String
|
166
|
+
$\: String?
|
167
167
|
|
168
168
|
# The last input line of string by gets or readline.
|
169
|
-
$_: String
|
169
|
+
$_: String?
|
170
170
|
|
171
171
|
# The string to the left of the last successful match.
|
172
|
-
$`: String
|
172
|
+
$`: String?
|
173
173
|
|
174
174
|
# The current standard error output.
|
175
175
|
$stderr: IO
|
@@ -181,4 +181,4 @@ $stdin: IO
|
|
181
181
|
$stdout: IO
|
182
182
|
|
183
183
|
# The information about the last match in the current scope (thread-local and frame-local).
|
184
|
-
$~: MatchData
|
184
|
+
$~: MatchData?
|