sorbet-runtime 0.5.10679 → 0.5.10687
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/types/enum.rb +5 -0
- data/lib/types/private/methods/_methods.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: '029da7463c926b8a4ee1a2cfcd5f754b6b6fc75a152b96c2d60ff8d4877a0552'
|
4
|
+
data.tar.gz: 1161c133c920bfbff8ea2587d5b08e80276b5afa4be98112febed1513bf7e18f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 72ab871b3b5f879461cf722023c43d3d7a56f7db2dcfb01d47b176662cfa4fb7939e73c85f48bbb27e0f82fb2c71a2cd8f2ad6e912edbbc177f43b5d5e136f91
|
7
|
+
data.tar.gz: 8769e96151a420f71db4dbab487c678d37d5d93717cc4b13e414561058300dce3fcb9fe944c59b0baaef2ac36d4cd63e32bd44acc7addb2bbde278b31cce7862
|
data/lib/types/enum.rb
CHANGED
@@ -362,6 +362,11 @@ class T::Enum
|
|
362
362
|
super
|
363
363
|
|
364
364
|
raise "Inheriting from children of T::Enum is prohibited" if self != T::Enum
|
365
|
+
|
366
|
+
# "oj" gem JSON support
|
367
|
+
if Object.const_defined?(:Oj)
|
368
|
+
Object.const_get(:Oj).register_odd(child_class, child_class, :try_deserialize, :serialize)
|
369
|
+
end
|
365
370
|
end
|
366
371
|
|
367
372
|
# Marshal support
|
@@ -83,7 +83,7 @@ module T::Private::Methods
|
|
83
83
|
raise "Procs cannot have override/abstract modifiers"
|
84
84
|
end
|
85
85
|
if decl.mod != PROC_TYPE
|
86
|
-
raise "You are passing a DeclBuilder as a type. Did you accidentally use `self` inside a `sig` block?"
|
86
|
+
raise "You are passing a DeclBuilder as a type. Did you accidentally use `self` inside a `sig` block? Perhaps you wanted the `T.self_type` instead: https://sorbet.org/docs/self-type"
|
87
87
|
end
|
88
88
|
if decl.returns == ARG_NOT_PROVIDED
|
89
89
|
raise "Procs must specify a return type"
|
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.10687
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Stripe
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-02-
|
11
|
+
date: 2023-02-25 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: minitest
|