sorbet-runtime 0.5.6304 → 0.5.6322
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/types/configuration.rb +9 -1
- data/lib/types/private/methods/_methods.rb +3 -4
- data/lib/types/private/methods/call_validation.rb +7 -785
- data/lib/types/private/methods/call_validation_2_6.rb +781 -0
- data/lib/types/private/methods/call_validation_2_7.rb +781 -0
- data/lib/types/types/typed_enumerable.rb +5 -1
- data/lib/types/utils.rb +7 -0
- metadata +5 -3
@@ -150,7 +150,11 @@ module T::Types
|
|
150
150
|
obj.class
|
151
151
|
else
|
152
152
|
# This is a specialized enumerable type, just return the class.
|
153
|
-
|
153
|
+
if T::Configuration::AT_LEAST_RUBY_2_7
|
154
|
+
Object.instance_method(:class).bind_call(obj)
|
155
|
+
else
|
156
|
+
Object.instance_method(:class).bind(obj).call
|
157
|
+
end
|
154
158
|
end
|
155
159
|
end
|
156
160
|
|
data/lib/types/utils.rb
CHANGED
@@ -52,6 +52,13 @@ module T::Utils
|
|
52
52
|
end.uniq
|
53
53
|
end
|
54
54
|
|
55
|
+
# Returns the signature for the `UnboundMethod`, or nil if it's not sig'd
|
56
|
+
#
|
57
|
+
# @example T::Utils.signature_for_method(x.method(:foo))
|
58
|
+
def self.signature_for_method(method)
|
59
|
+
T::Private::Methods.signature_for_method(method)
|
60
|
+
end
|
61
|
+
|
55
62
|
# Returns the signature for the instance method on the supplied module, or nil if it's not found or not typed.
|
56
63
|
#
|
57
64
|
# @example T::Utils.signature_for_instance_method(MyClass, :my_method)
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sorbet-runtime
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.5.
|
4
|
+
version: 0.5.6322
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Stripe
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-
|
11
|
+
date: 2021-03-05 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: minitest
|
@@ -177,6 +177,8 @@ files:
|
|
177
177
|
- lib/types/private/final.rb
|
178
178
|
- lib/types/private/methods/_methods.rb
|
179
179
|
- lib/types/private/methods/call_validation.rb
|
180
|
+
- lib/types/private/methods/call_validation_2_6.rb
|
181
|
+
- lib/types/private/methods/call_validation_2_7.rb
|
180
182
|
- lib/types/private/methods/decl_builder.rb
|
181
183
|
- lib/types/private/methods/modes.rb
|
182
184
|
- lib/types/private/methods/signature.rb
|
@@ -257,7 +259,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
257
259
|
- !ruby/object:Gem::Version
|
258
260
|
version: '0'
|
259
261
|
requirements: []
|
260
|
-
rubygems_version: 3.
|
262
|
+
rubygems_version: 3.1.4
|
261
263
|
signing_key:
|
262
264
|
specification_version: 4
|
263
265
|
summary: Sorbet runtime
|