sorbet-runtime 0.6.13277 → 0.6.13279
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 +4 -4
- data/lib/types/compatibility_patches.rb +12 -12
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 94f9430afda35cc983dbaf2b2ece5ce0f8528c3e3928497a9a659f5f177f7a69
|
|
4
|
+
data.tar.gz: a7b483b8aacb2b23c95a152af38b37cd6c99fba0803bd950a56edfed6bd57922
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: a0c5963cf3184b283798aaaf31cec437eb366f435f9daeb29a8840f949b7062f2cd460cd80cfb075082f126d9e49850dbd2f6f3741ce3ef3b0a8d733be8f7c8d
|
|
7
|
+
data.tar.gz: 663c026581f6a6a4bb5d2be94177b0cf839e31bd4a05f7cc9e9f24ada3f5ee7e844c2ead306ac91bfc2e73acb27cfac7925008509b1122fe3f37acb7793369a1
|
|
@@ -60,18 +60,18 @@ if defined? ::RSpec::Core::MemoizedHelpers::ClassMethods
|
|
|
60
60
|
# `let!`, `subject`, and `subject!` are implemented by dispatching to
|
|
61
61
|
# `let`, so this should cover those methods too.
|
|
62
62
|
def let(name, &block)
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
T::Private::DeclState.current.reset!
|
|
63
|
+
res = T::Private::DeclState.current.without_on_method_added do
|
|
64
|
+
# Allow the `let`-defined methods to be defined
|
|
65
|
+
super
|
|
66
|
+
end
|
|
68
67
|
|
|
69
|
-
|
|
70
|
-
super
|
|
68
|
+
return res unless T::Private::DeclState.current.active_declaration
|
|
71
69
|
|
|
72
|
-
#
|
|
73
|
-
#
|
|
74
|
-
#
|
|
70
|
+
# Force the `sig` to attach to the outer `let`-defined method,
|
|
71
|
+
# not the one inside the `LetDefinitions` module. Re-running
|
|
72
|
+
# `define_method` with the method we grab via reflection there
|
|
73
|
+
# triggers the `method_added`, which allows the active_declaration
|
|
74
|
+
# to be consumed.
|
|
75
75
|
#
|
|
76
76
|
# Unfortunately, this means that the runtime checks are not
|
|
77
77
|
# memoized (but they never were).
|
|
@@ -80,11 +80,11 @@ if defined? ::RSpec::Core::MemoizedHelpers::ClassMethods
|
|
|
80
80
|
# written inside the `LetDefinitions` module didn't work, because
|
|
81
81
|
# things like `sig {override}` broke: the `LetDefinitions` module
|
|
82
82
|
# has no ancestors and thus does not override anything)
|
|
83
|
-
|
|
84
83
|
method = instance_method(name)
|
|
85
84
|
remove_method(name)
|
|
86
|
-
T::Private::DeclState.current.active_declaration = current_declaration
|
|
87
85
|
define_method(name, method)
|
|
86
|
+
|
|
87
|
+
res
|
|
88
88
|
end
|
|
89
89
|
end
|
|
90
90
|
::RSpec::Core::MemoizedHelpers::ClassMethods.prepend(MemoizedHelpers)
|