sorbet-runtime 0.5.5400 → 0.5.5403

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: f4f9fd0690e5e4161f08d170c0ad34c991b419d7718cb6d3cc3db90036c35387
4
- data.tar.gz: acd9cfcc9cca1df5271b927d2dd85ffa0276337276a0df1ee522fe0c55dde9a4
3
+ metadata.gz: f473428349c55b787d0d32060bf8a78448adf9a1133f0c8e20f817b83e7d4c58
4
+ data.tar.gz: 434b145981f510ef0148a270ec5227fcfb8d1c741e4e9eb26ebf0ebc1e665c96
5
5
  SHA512:
6
- metadata.gz: c9935807087e676840c09e8e2c43b4c3bc25639264bb8ed793a0e677fce16742db55a14362a39e701da6e63b130ffa1213717e755a98695db849dc1c5ba9dcd5
7
- data.tar.gz: b0ee575a179bb1a6da3a10d3f40a16e27a94f739c28ca47bd174b9f7c854d90e5a5085bea444d715f1dc4fa12ffef98cdc98166c2af962ac06c5ff27dce0f911
6
+ metadata.gz: 9de7bf33a67fb9f5dbdb430138eae9ebbcfe2ecda211419728948f7f8095cc26ca97927886fc23378a24da62e0324480101e4ea9a153e4b0e45e3b97fda3cd44
7
+ data.tar.gz: 15b30b2ea60102d219e53d774aea7bfc56277bee5616a5a24f3bb47a774a6ec8e9cf02c6addadc390e8a40cec86619e69aa319f0b8086ad2236209e895405b62
@@ -39,9 +39,9 @@ module T::Props
39
39
  # Use separate methods in order to ensure that we only close over necessary
40
40
  # variables
41
41
  if !T::Props::Utils.need_nil_write_check?(rules) || has_explicit_nil_default
42
- nilable_proc(prop, accessor_key, non_nil_type)
42
+ nilable_proc(prop, accessor_key, non_nil_type, klass)
43
43
  else
44
- non_nil_proc(prop, accessor_key, non_nil_type)
44
+ non_nil_proc(prop, accessor_key, non_nil_type, klass)
45
45
  end
46
46
  end
47
47
 
@@ -50,16 +50,17 @@ module T::Props
50
50
  prop: Symbol,
51
51
  accessor_key: Symbol,
52
52
  non_nil_type: T.any(T::Types::Base, T.all(T::Props::CustomType, Module)),
53
+ klass: T.all(Module, T::Props::ClassMethods),
53
54
  )
54
55
  .returns(SetterProc)
55
56
  end
56
- private_class_method def self.non_nil_proc(prop, accessor_key, non_nil_type)
57
+ private_class_method def self.non_nil_proc(prop, accessor_key, non_nil_type, klass)
57
58
  proc do |val|
58
59
  if non_nil_type.valid?(val)
59
60
  instance_variable_set(accessor_key, val)
60
61
  else
61
62
  T::Props::Private::SetterFactory.raise_pretty_error(
62
- T.unsafe(self.class),
63
+ klass,
63
64
  prop,
64
65
  non_nil_type,
65
66
  val,
@@ -73,10 +74,11 @@ module T::Props
73
74
  prop: Symbol,
74
75
  accessor_key: Symbol,
75
76
  non_nil_type: T.any(T::Types::Base, T.all(T::Props::CustomType, Module)),
77
+ klass: T.all(Module, T::Props::ClassMethods),
76
78
  )
77
79
  .returns(SetterProc)
78
80
  end
79
- private_class_method def self.nilable_proc(prop, accessor_key, non_nil_type)
81
+ private_class_method def self.nilable_proc(prop, accessor_key, non_nil_type, klass)
80
82
  proc do |val|
81
83
  if val.nil?
82
84
  instance_variable_set(accessor_key, nil)
@@ -84,7 +86,7 @@ module T::Props
84
86
  instance_variable_set(accessor_key, val)
85
87
  else
86
88
  T::Props::Private::SetterFactory.raise_pretty_error(
87
- T.unsafe(self.class),
89
+ klass,
88
90
  prop,
89
91
  non_nil_type,
90
92
  val,
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.5400
4
+ version: 0.5.5403
5
5
  platform: ruby
6
6
  authors:
7
7
  - Stripe
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-02-26 00:00:00.000000000 Z
11
+ date: 2020-02-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: minitest