sorbet-runtime 0.5.6307 → 0.5.6317

Sign up to get free protection for your applications and to get access to all the features.
@@ -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
- Object.instance_method(:class).bind(obj).call
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.6307
4
+ version: 0.5.6317
5
5
  platform: ruby
6
6
  authors:
7
7
  - Stripe
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-02-28 00:00:00.000000000 Z
11
+ date: 2021-03-02 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