sorbet-runtime 0.5.9195 → 0.5.9218
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 50debdab68e222f1e7e09dc2ffd9b715e89ea9f40fb4488578c3d1475e3dc3d7
|
4
|
+
data.tar.gz: 0d5baa83dd4cf79d41464d0742cebfd3b340d8629c73a7f8c4ef5551b6141499
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: bf03b57017b4b7659011b55f4dd8cc23c5be26a090f6e97d8e6c65aea1937df379c23468187690f669c8ab99095806c8d45f0f7de0b0613c2f602f25b9c0b4d5
|
7
|
+
data.tar.gz: 5db711732ff8dd1d84f1b097bfdda2bc01af31758b77ccd39d541e115615eb1f41c429647d42b18ed67bd5606daa5cada725f423678c8d28a14add8b4d437a75
|
data/lib/types/helpers.rb
CHANGED
@@ -4,6 +4,8 @@
|
|
4
4
|
# Use as a mixin with extend (`extend T::Helpers`).
|
5
5
|
# Docs at https://confluence.corp.stripe.com/display/PRODINFRA/Ruby+Types
|
6
6
|
module T::Helpers
|
7
|
+
extend T::Sig
|
8
|
+
|
7
9
|
Private = T::Private
|
8
10
|
|
9
11
|
### Class/Module Helpers ###
|
@@ -44,7 +46,7 @@ module T::Helpers
|
|
44
46
|
# module MyHelper
|
45
47
|
# extend T::Helpers
|
46
48
|
#
|
47
|
-
# requires_ancestor Kernel
|
49
|
+
# requires_ancestor { Kernel }
|
48
50
|
# end
|
49
51
|
#
|
50
52
|
# class MyClass < BasicObject # error: `MyClass` must include `Kernel` (required by `MyHelper`)
|
@@ -52,5 +54,5 @@ module T::Helpers
|
|
52
54
|
# end
|
53
55
|
#
|
54
56
|
# TODO: implement the checks in sorbet-runtime.
|
55
|
-
def requires_ancestor(
|
57
|
+
def requires_ancestor(*mods, &block); end
|
56
58
|
end
|
@@ -40,6 +40,11 @@ module T::Private::Abstract::Declare
|
|
40
40
|
end
|
41
41
|
super(*args, &blk)
|
42
42
|
end
|
43
|
+
|
44
|
+
# Ruby doesn not emit "method redefined" warnings for aliased methods
|
45
|
+
# (more robust than undef_method that would create a small window in which the method doesn't exist)
|
46
|
+
mod.send(:alias_method, :initialize, :initialize)
|
47
|
+
|
43
48
|
if mod.respond_to?(:ruby2_keywords, true)
|
44
49
|
mod.send(:ruby2_keywords, :initialize)
|
45
50
|
end
|
@@ -83,6 +83,11 @@ module T::Props
|
|
83
83
|
lazily_defined_methods[name] = blk
|
84
84
|
|
85
85
|
cls = decorated_class
|
86
|
+
if cls.method_defined?(name)
|
87
|
+
# Ruby doesn not emit "method redefined" warnings for aliased methods
|
88
|
+
# (more robust than undef_method that would create a small window in which the method doesn't exist)
|
89
|
+
cls.send(:alias_method, name, name)
|
90
|
+
end
|
86
91
|
cls.send(:define_method, name) do |*args|
|
87
92
|
self.class.decorator.send(:eval_lazily_defined_method!, name)
|
88
93
|
send(name, *args)
|
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.9218
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Stripe
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-10-
|
11
|
+
date: 2021-10-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: minitest
|