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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 10e2f25720f79e5e0ab5bfb00abc030dc87c73be629112c11d8844f89726a4a3
4
- data.tar.gz: b05c04621a3779ded3f6000abaaf1a69aba85a4f73c3310e445d334e90f505c8
3
+ metadata.gz: '029da7463c926b8a4ee1a2cfcd5f754b6b6fc75a152b96c2d60ff8d4877a0552'
4
+ data.tar.gz: 1161c133c920bfbff8ea2587d5b08e80276b5afa4be98112febed1513bf7e18f
5
5
  SHA512:
6
- metadata.gz: c87d22bce8fc6ccd7e001a54d625465a15a0a3d004a92d9cb2f7f2db233adbd339974bb281a242fa0fe4f2181b34201714da546bae40143e701480c6772cca97
7
- data.tar.gz: 1756ba572c0bf4cd6a0915d1b085bb5fa2bc3cdfaced16babc0098c5750bab76829e5b8b1cef322418ee654363b3d0afc265f52b0f107d60e62d8210d208ada5
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.10679
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-22 00:00:00.000000000 Z
11
+ date: 2023-02-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: minitest