rbs 1.3.2 → 1.5.1
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 +1 -1
- data/CHANGELOG.md +52 -0
- data/Gemfile +1 -0
- data/Rakefile +4 -0
- data/core/array.rbs +8 -7
- data/core/builtin.rbs +1 -1
- data/core/enumerable.rbs +11 -10
- data/core/enumerator.rbs +2 -2
- data/core/exception.rbs +1 -0
- data/core/false_class.rbs +4 -4
- data/core/file.rbs +3 -1
- data/core/float.rbs +1 -1
- data/core/global_variables.rbs +180 -0
- data/core/hash.rbs +7 -7
- data/core/integer.rbs +1 -2
- data/core/io.rbs +9 -5
- data/core/io/wait.rbs +37 -0
- data/core/kernel.rbs +25 -2
- data/core/object.rbs +1 -1
- data/core/ractor.rbs +779 -0
- data/core/range.rbs +11 -9
- data/core/string_io.rbs +3 -5
- data/core/true_class.rbs +4 -4
- data/lib/rbs.rb +1 -0
- data/lib/rbs/cli.rb +1 -0
- data/lib/rbs/errors.rb +16 -0
- data/lib/rbs/parser.rb +1 -1
- data/lib/rbs/parser.y +1 -1
- data/lib/rbs/prototype/rb.rb +8 -1
- data/lib/rbs/prototype/runtime.rb +1 -1
- data/lib/rbs/type_alias_dependency.rb +88 -0
- data/lib/rbs/validator.rb +5 -0
- data/lib/rbs/version.rb +1 -1
- data/sig/errors.rbs +9 -0
- data/sig/type_alias_dependency.rbs +22 -0
- data/sig/validator.rbs +2 -0
- data/stdlib/digest/0/digest.rbs +418 -0
- data/stdlib/openssl/0/openssl.rbs +3711 -0
- data/stdlib/pathname/0/pathname.rbs +2 -2
- data/stdlib/resolv/0/resolv.rbs +1 -1
- data/stdlib/rubygems/0/rubygems.rbs +1 -1
- data/stdlib/securerandom/0/securerandom.rbs +3 -1
- data/stdlib/uri/0/generic.rbs +3 -3
- metadata +10 -3
@@ -755,8 +755,8 @@ class Pathname
|
|
755
755
|
#
|
756
756
|
# See File.open.
|
757
757
|
#
|
758
|
-
def open: (?
|
759
|
-
| [T] (?
|
758
|
+
def open: (?(string | int) mode, ?int perm) -> File
|
759
|
+
| [T] (?(string | int) mode, ?int perm) { (File) -> T } -> T
|
760
760
|
|
761
761
|
# Opens the referenced directory.
|
762
762
|
#
|
data/stdlib/resolv/0/resolv.rbs
CHANGED
@@ -177,7 +177,7 @@ class Resolv::DNS
|
|
177
177
|
# `address` must be a Resolv::IPv4, Resolv::IPv6 or a String. Retrieved names
|
178
178
|
# will be Resolv::DNS::Name instances.
|
179
179
|
#
|
180
|
-
def getnames: (ip_address | dns_name address) -> [Resolv::DNS::Name]
|
180
|
+
def getnames: (ip_address | dns_name address) -> Array[Resolv::DNS::Name]
|
181
181
|
|
182
182
|
# Look up the `typeclass` DNS resource of `name`.
|
183
183
|
#
|
@@ -685,7 +685,7 @@ module Gem
|
|
685
685
|
# NOTE: Enabling automatic discovery on multiuser systems can lead to execution
|
686
686
|
# of arbitrary code when used from directories outside your control.
|
687
687
|
#
|
688
|
-
def self.use_gemdeps: (?String path) ->
|
688
|
+
def self.use_gemdeps: (?String path) -> void
|
689
689
|
|
690
690
|
# Use the `home` and `paths` values for Gem.dir and Gem.path. Used mainly by
|
691
691
|
# the unit tests to provide environment isolation.
|
@@ -5,7 +5,9 @@ module SecureRandom
|
|
5
5
|
def self.base64: (?Integer?) -> String
|
6
6
|
def self.hex: (?Integer?) -> String
|
7
7
|
def self.random_bytes: (?Integer?) -> String
|
8
|
-
def self.random_number: (
|
8
|
+
def self.random_number: () -> Float
|
9
|
+
| (Integer) -> Integer
|
10
|
+
| (Numeric) -> Numeric
|
9
11
|
def self.urlsafe_base64: (?Integer?, ?bool?) -> String
|
10
12
|
def self.uuid: () -> String
|
11
13
|
end
|
data/stdlib/uri/0/generic.rbs
CHANGED
@@ -260,7 +260,7 @@ module URI
|
|
260
260
|
#
|
261
261
|
# URI("http://foo/bar/baz?search=FooBar#ponies").fragment #=> "ponies"
|
262
262
|
#
|
263
|
-
attr_reader fragment: String
|
263
|
+
attr_reader fragment: String?
|
264
264
|
|
265
265
|
# Returns the parser to be used.
|
266
266
|
#
|
@@ -706,7 +706,7 @@ module URI
|
|
706
706
|
# uri.merge!("/main.rbx?page=1")
|
707
707
|
# uri.to_s # => "http://my.example.com/main.rbx?page=1"
|
708
708
|
#
|
709
|
-
def merge!: (
|
709
|
+
def merge!: (string oth) -> String
|
710
710
|
|
711
711
|
#
|
712
712
|
# == Args
|
@@ -726,7 +726,7 @@ module URI
|
|
726
726
|
# uri.merge("/main.rbx?page=1")
|
727
727
|
# # => "http://my.example.com/main.rbx?page=1"
|
728
728
|
#
|
729
|
-
def merge: (
|
729
|
+
def merge: (string oth) -> URI::Generic
|
730
730
|
|
731
731
|
# :stopdoc:
|
732
732
|
def route_from_path: (String src, String dst) -> String
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rbs
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.5.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Soutaro Matsumoto
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-
|
11
|
+
date: 2021-08-21 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: RBS is the language for type signatures for Ruby and standard library
|
14
14
|
definitions.
|
@@ -52,9 +52,11 @@ files:
|
|
52
52
|
- core/file_test.rbs
|
53
53
|
- core/float.rbs
|
54
54
|
- core/gc.rbs
|
55
|
+
- core/global_variables.rbs
|
55
56
|
- core/hash.rbs
|
56
57
|
- core/integer.rbs
|
57
58
|
- core/io.rbs
|
59
|
+
- core/io/wait.rbs
|
58
60
|
- core/kernel.rbs
|
59
61
|
- core/marshal.rbs
|
60
62
|
- core/match_data.rbs
|
@@ -67,6 +69,7 @@ files:
|
|
67
69
|
- core/object_space.rbs
|
68
70
|
- core/proc.rbs
|
69
71
|
- core/process.rbs
|
72
|
+
- core/ractor.rbs
|
70
73
|
- core/random.rbs
|
71
74
|
- core/range.rbs
|
72
75
|
- core/rational.rbs
|
@@ -134,6 +137,7 @@ files:
|
|
134
137
|
- lib/rbs/test/spy.rb
|
135
138
|
- lib/rbs/test/tester.rb
|
136
139
|
- lib/rbs/test/type_check.rb
|
140
|
+
- lib/rbs/type_alias_dependency.rb
|
137
141
|
- lib/rbs/type_name.rb
|
138
142
|
- lib/rbs/type_name_resolver.rb
|
139
143
|
- lib/rbs/types.rb
|
@@ -180,6 +184,7 @@ files:
|
|
180
184
|
- sig/rbs.rbs
|
181
185
|
- sig/repository.rbs
|
182
186
|
- sig/substitution.rbs
|
187
|
+
- sig/type_alias_dependency.rbs
|
183
188
|
- sig/type_name_resolver.rbs
|
184
189
|
- sig/typename.rbs
|
185
190
|
- sig/types.rbs
|
@@ -200,6 +205,7 @@ files:
|
|
200
205
|
- stdlib/date/0/date.rbs
|
201
206
|
- stdlib/date/0/date_time.rbs
|
202
207
|
- stdlib/dbm/0/dbm.rbs
|
208
|
+
- stdlib/digest/0/digest.rbs
|
203
209
|
- stdlib/erb/0/erb.rbs
|
204
210
|
- stdlib/fiber/0/fiber.rbs
|
205
211
|
- stdlib/fileutils/0/fileutils.rbs
|
@@ -215,6 +221,7 @@ files:
|
|
215
221
|
- stdlib/monitor/0/monitor.rbs
|
216
222
|
- stdlib/mutex_m/0/mutex_m.rbs
|
217
223
|
- stdlib/net-http/0/net-http.rbs
|
224
|
+
- stdlib/openssl/0/openssl.rbs
|
218
225
|
- stdlib/optparse/0/optparse.rbs
|
219
226
|
- stdlib/pathname/0/pathname.rbs
|
220
227
|
- stdlib/prettyprint/0/prettyprint.rbs
|
@@ -294,7 +301,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
294
301
|
- !ruby/object:Gem::Version
|
295
302
|
version: '0'
|
296
303
|
requirements: []
|
297
|
-
rubygems_version: 3.2.
|
304
|
+
rubygems_version: 3.2.3
|
298
305
|
signing_key:
|
299
306
|
specification_version: 4
|
300
307
|
summary: Type signature for Ruby.
|