sorbet-runtime 0.6.12534 → 0.6.12544
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: ee113a3cd21e2a9e34722bee3ea8be288df38a05ba062bdd01fa57c243cad4b4
|
4
|
+
data.tar.gz: '0498ec7e9e48f862c6662d8808d3d0d0195edcaf596f3eb6aa43f421b4fc91b1'
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d2958534c3904db734059d82f46626db095cd9f7e4121b248b914c6f38bf7f13362eb6807fa2f635ccfd3f7c2e98329281b4945234959458cd5317ea4ee44aeb
|
7
|
+
data.tar.gz: 99a36c45086fe9db4e45874df7acce8cf9da8d389b42fca310e91437b027ecb62d9075b6be288e26a04130381384bc8f7f58a82880289790c711a76ba37f1cfd
|
@@ -12,7 +12,7 @@
|
|
12
12
|
# modules that override the `hash` method with something completely broken.
|
13
13
|
module T::Private::Abstract::Data
|
14
14
|
def self.get(mod, key)
|
15
|
-
mod.instance_variable_get("@opus_abstract__#{key}")
|
15
|
+
mod.instance_variable_get("@opus_abstract__#{key}")
|
16
16
|
end
|
17
17
|
|
18
18
|
def self.set(mod, key, value)
|
data/lib/types/private/sealed.rb
CHANGED
@@ -70,7 +70,7 @@ module T::Private::Sealed
|
|
70
70
|
|
71
71
|
def self.validate_inheritance(caller_loc, parent, child, verb)
|
72
72
|
this_file = caller_loc&.path
|
73
|
-
decl_file = parent.instance_variable_get(:@sorbet_sealed_module_decl_file)
|
73
|
+
decl_file = parent.instance_variable_get(:@sorbet_sealed_module_decl_file)
|
74
74
|
|
75
75
|
if !this_file
|
76
76
|
raise "Could not use backtrace to determine file for #{verb} child #{child}"
|
@@ -174,7 +174,9 @@ class T::Props::Decorator
|
|
174
174
|
.checked(:never)
|
175
175
|
end
|
176
176
|
def prop_get(instance, prop, rules=prop_rules(prop))
|
177
|
-
|
177
|
+
# `instance_variable_get` will return nil if the variable doesn't exist
|
178
|
+
# which is what we want to have happen for the logic below.
|
179
|
+
val = instance.instance_variable_get(rules[:accessor_key])
|
178
180
|
if !val.nil?
|
179
181
|
val
|
180
182
|
elsif (d = rules[:ifunset])
|
@@ -194,7 +196,9 @@ class T::Props::Decorator
|
|
194
196
|
.checked(:never)
|
195
197
|
end
|
196
198
|
def prop_get_if_set(instance, prop, rules=prop_rules(prop))
|
197
|
-
|
199
|
+
# `instance_variable_get` will return nil if the variable doesn't exist
|
200
|
+
# which is what we want to have happen for the return value here.
|
201
|
+
instance.instance_variable_get(rules[:accessor_key])
|
198
202
|
end
|
199
203
|
alias_method :get, :prop_get_if_set # Alias for backwards compatibility
|
200
204
|
|
@@ -121,8 +121,8 @@ module T::Props::Serializable
|
|
121
121
|
private def with_existing_hash(changed_props, existing_hash:)
|
122
122
|
serialized = existing_hash
|
123
123
|
new_val = self.class.from_hash(serialized.merge(recursive_stringify_keys(changed_props)))
|
124
|
-
old_extra = self.instance_variable_get(:@_extra_props)
|
125
|
-
new_extra = new_val.instance_variable_get(:@_extra_props)
|
124
|
+
old_extra = self.instance_variable_get(:@_extra_props)
|
125
|
+
new_extra = new_val.instance_variable_get(:@_extra_props)
|
126
126
|
if old_extra != new_extra
|
127
127
|
difference =
|
128
128
|
if old_extra
|
@@ -137,8 +137,7 @@ module T::Props::Serializable
|
|
137
137
|
|
138
138
|
# Asserts if this property is missing during strict serialize
|
139
139
|
private def required_prop_missing_from_serialize(prop)
|
140
|
-
if
|
141
|
-
@_required_props_missing_from_deserialize&.include?(prop)
|
140
|
+
if @_required_props_missing_from_deserialize&.include?(prop)
|
142
141
|
# If the prop was already missing during deserialization, that means the application
|
143
142
|
# code already had to deal with a nil value, which means we wouldn't be accomplishing
|
144
143
|
# much by raising here (other than causing an unnecessary breakage).
|
@@ -353,11 +352,7 @@ module T::Props::Serializable::DecoratorMethods
|
|
353
352
|
private_constant :EMPTY_EXTRA_PROPS
|
354
353
|
|
355
354
|
def extra_props(instance)
|
356
|
-
|
357
|
-
instance.instance_variable_get(:@_extra_props) || EMPTY_EXTRA_PROPS
|
358
|
-
else
|
359
|
-
EMPTY_EXTRA_PROPS
|
360
|
-
end
|
355
|
+
instance.instance_variable_get(:@_extra_props) || EMPTY_EXTRA_PROPS
|
361
356
|
end
|
362
357
|
|
363
358
|
# adds to the default result of T::Props::PrettyPrintable
|
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.6.
|
4
|
+
version: 0.6.12544
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Stripe
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2025-09-
|
11
|
+
date: 2025-09-17 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: minitest
|