rbs 3.1.3 → 3.2.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (73) hide show
  1. checksums.yaml +4 -4
  2. data/.github/workflows/ruby.yml +0 -6
  3. data/CHANGELOG.md +82 -0
  4. data/Gemfile +0 -6
  5. data/Gemfile.lock +12 -21
  6. data/README.md +1 -1
  7. data/Rakefile +45 -1
  8. data/Steepfile +3 -3
  9. data/core/array.rbs +0 -8
  10. data/core/binding.rbs +7 -69
  11. data/core/builtin.rbs +33 -8
  12. data/core/constants.rbs +13 -5
  13. data/core/dir.rbs +25 -25
  14. data/core/errno.rbs +474 -590
  15. data/core/exception.rbs +1 -1
  16. data/core/global_variables.rbs +27 -27
  17. data/core/io.rbs +163 -172
  18. data/core/kernel.rbs +58 -38
  19. data/core/module.rbs +34 -32
  20. data/core/object.rbs +3 -7
  21. data/core/string_io.rbs +9 -0
  22. data/core/thread.rbs +25 -1
  23. data/core/time.rbs +3 -3
  24. data/core/warning.rbs +3 -1
  25. data/docs/CONTRIBUTING.md +1 -1
  26. data/docs/rbs_by_example.md +16 -35
  27. data/docs/repo.md +1 -1
  28. data/docs/sigs.md +7 -7
  29. data/docs/stdlib.md +2 -3
  30. data/docs/syntax.md +40 -40
  31. data/lib/rbs/cli.rb +15 -4
  32. data/lib/rbs/collection/config/lockfile_generator.rb +6 -2
  33. data/lib/rbs/collection/installer.rb +5 -2
  34. data/lib/rbs/collection/sources/stdlib.rb +5 -1
  35. data/lib/rbs/errors.rb +8 -1
  36. data/lib/rbs/file_finder.rb +1 -1
  37. data/lib/rbs/prototype/rb.rb +64 -6
  38. data/lib/rbs/prototype/rbi.rb +2 -6
  39. data/lib/rbs/prototype/runtime.rb +29 -8
  40. data/lib/rbs/subtractor.rb +17 -0
  41. data/lib/rbs/type_name.rb +4 -4
  42. data/lib/rbs/version.rb +1 -1
  43. data/rbs.gemspec +1 -1
  44. data/schema/decls.json +1 -1
  45. data/sig/errors.rbs +54 -0
  46. data/sig/parser.rbs +2 -2
  47. data/sig/prototype/rb.rbs +9 -1
  48. data/sig/subtractor.rbs +4 -0
  49. data/stdlib/logger/0/logger.rbs +1 -1
  50. data/stdlib/observable/0/observable.rbs +219 -0
  51. data/stdlib/uri/0/common.rbs +24 -0
  52. data/stdlib/zlib/0/buf_error.rbs +79 -0
  53. data/stdlib/zlib/0/data_error.rbs +79 -0
  54. data/stdlib/zlib/0/deflate.rbs +276 -0
  55. data/stdlib/zlib/0/error.rbs +89 -0
  56. data/stdlib/zlib/0/gzip_file/crc_error.rbs +115 -0
  57. data/stdlib/zlib/0/gzip_file/error.rbs +128 -0
  58. data/stdlib/zlib/0/gzip_file/length_error.rbs +115 -0
  59. data/stdlib/zlib/0/gzip_file/no_footer.rbs +114 -0
  60. data/stdlib/zlib/0/gzip_file.rbs +228 -0
  61. data/stdlib/zlib/0/gzip_reader.rbs +362 -0
  62. data/stdlib/zlib/0/gzip_writer.rbs +237 -0
  63. data/stdlib/zlib/0/inflate.rbs +249 -0
  64. data/stdlib/zlib/0/mem_error.rbs +79 -0
  65. data/stdlib/zlib/0/need_dict.rbs +82 -0
  66. data/stdlib/zlib/0/stream_end.rbs +80 -0
  67. data/stdlib/zlib/0/stream_error.rbs +80 -0
  68. data/stdlib/zlib/0/version_error.rbs +80 -0
  69. data/stdlib/zlib/0/zstream.rbs +270 -0
  70. metadata +22 -6
  71. data/stdlib/prime/0/integer-extension.rbs +0 -41
  72. data/stdlib/prime/0/manifest.yaml +0 -2
  73. 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
@@ -1,5 +1,5 @@
1
1
  # The Exception object set by Kernel#raise.
2
- $!: Exception | nil
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 | nil
11
+ $&: String?
12
12
 
13
13
  # The string to the right of the last successful match.
14
- $': String | nil
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 | nil
20
+ $+: String?
21
21
 
22
22
  # The output field separator for Kernel#print and Array#join. Non-nil $, will be deprecated.
23
- $,: String | nil
23
+ $,: String?
24
24
 
25
25
  # The input record separator, newline by default.
26
- $-0: String | nil
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: bool
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 | nil
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 | nil
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 | nil
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 | nil
81
+ $1: String?
82
82
 
83
83
  # The Nth group of the last successful match. May be > 1.
84
- $2: String | nil
84
+ $2: String?
85
85
 
86
86
  # The Nth group of the last successful match. May be > 1.
87
- $3: String | nil
87
+ $3: String?
88
88
 
89
89
  # The Nth group of the last successful match. May be > 1.
90
- $4: String | nil
90
+ $4: String?
91
91
 
92
92
  # The Nth group of the last successful match. May be > 1.
93
- $5: String | nil
93
+ $5: String?
94
94
 
95
95
  # The Nth group of the last successful match. May be > 1.
96
- $6: String | nil
96
+ $6: String?
97
97
 
98
98
  # The Nth group of the last successful match. May be > 1.
99
- $7: String | nil
99
+ $7: String?
100
100
 
101
101
  # The Nth group of the last successful match. May be > 1.
102
- $8: String | nil
102
+ $8: String?
103
103
 
104
104
  # The Nth group of the last successful match. May be > 1.
105
- $9: String | nil
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 | nil
127
+ $?: Process::Status?
128
128
 
129
129
  # The same as <code>$!.backtrace</code>.
130
- $@: Array[String] | nil
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: bool
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 | nil
163
+ $VERBOSE: bool?
164
164
 
165
165
  # The output record separator for Kernel#print and IO#write. Default is +nil+.
166
- $\: String | nil
166
+ $\: String?
167
167
 
168
168
  # The last input line of string by gets or readline.
169
- $_: String | nil
169
+ $_: String?
170
170
 
171
171
  # The string to the left of the last successful match.
172
- $`: String | nil
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 | nil
184
+ $~: MatchData?