sorbet-runtime 0.4.4253 → 0.4.4286

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
  SHA1:
3
- metadata.gz: de11dcda7e38c4977b8e8adb679d16e2e34b94df
4
- data.tar.gz: 930cdf2804d7b8919dea38ccd474e261a654e03d
3
+ metadata.gz: 58fd1f33f4010ee7ed667a320704eee0b40e9d52
4
+ data.tar.gz: 957e37e28a0da87dfcff6396623188d571ad1efb
5
5
  SHA512:
6
- metadata.gz: 77caf2c55b6c999939a4860e8be38088854a4530cac75bee1c9cca68ed2d8b8c9ef6182061a15c73d0e5cf343ef6e2caaa7f3e5c45690b79ed41af18ebe1d2b4
7
- data.tar.gz: 76a0990ca32cd691b58ae71ff7a34e6e63f0c674da3945718d6a5060f91bc08e50ec55972aafb8cf87930fba2220da3a336b557c8ad9121475e0a97445539a78
6
+ metadata.gz: 65b2b394682e14565f1fd12530c128bed0275bf520219e865cedc19c24e03e97dc83931a30649faf3cd1ad4935ca64596e58da8c51b74f9da21287c5b2e1e382
7
+ data.tar.gz: 618b4fc7577d7b4fef9b0f97843cc1e8dc47a3408e3904e27280b23219491dba9db8b94bd28e38494d653d93e3bf72223e10e443d4d5530e3ba6553964b5615d
data/lib/types/_types.rb CHANGED
@@ -10,7 +10,7 @@
10
10
  # |_| \__, | .__/ \___||___/
11
11
  # |___/|_|
12
12
  #
13
- # Docs at http://go/types.
13
+ # Docs at https://sorbet.org/docs/sigs
14
14
  #
15
15
  # Types that you can pass to `sig`:
16
16
  #
@@ -18,6 +18,10 @@ module T::Private::Abstract::Declare
18
18
  mod.extend(T::InterfaceWrapper::Helpers)
19
19
 
20
20
  if mod.is_a?(Class)
21
+ if mod < T::Struct
22
+ raise "#{mod.name} is a subclass of T::Struct and cannot be declared abstract"
23
+ end
24
+
21
25
  if type == :interface
22
26
  # Since `interface!` is just `abstract!` with some extra validation, we could technically
23
27
  # allow this, but it's unclear there are good use cases, and it might be confusing.
data/lib/types/sig.rb CHANGED
@@ -3,7 +3,7 @@
3
3
  # rubocop:disable PrisonGuard/NoTopLevelDeclarations, PrisonGuard/PackageMatchesDirectory
4
4
 
5
5
  # Used as a mixin to any class so that you can call `sig`.
6
- # Docs at http://go/types
6
+ # Docs at https://sorbet.org/docs/sigs
7
7
  module T::Sig
8
8
  module WithoutRuntime
9
9
  # At runtime, does nothing, but statically it is treated exactly the same
data/lib/types/struct.rb CHANGED
@@ -1,8 +1,18 @@
1
1
  # frozen_string_literal: true
2
2
  # typed: true
3
3
 
4
- class T::Struct
4
+ class T::InexactStruct
5
5
  include T::Props
6
6
  include T::Props::Serializable
7
7
  include T::Props::Constructor
8
8
  end
9
+
10
+ class T::Struct < T::InexactStruct
11
+ def self.inherited(subclass)
12
+ super(subclass)
13
+ T::Private::ClassUtils.replace_method(subclass.singleton_class, :inherited) do |s|
14
+ super(s)
15
+ raise "#{self.name} is a subclass of T::Struct and cannot be subclassed"
16
+ end
17
+ end
18
+ end
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.4.4253
4
+ version: 0.4.4286
5
5
  platform: ruby
6
6
  authors:
7
7
  - Stripe
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-06-20 00:00:00.000000000 Z
11
+ date: 2019-06-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: minitest
@@ -137,7 +137,10 @@ required_ruby_version: !ruby/object:Gem::Requirement
137
137
  requirements:
138
138
  - - ">="
139
139
  - !ruby/object:Gem::Version
140
- version: '0'
140
+ version: 2.3.0
141
+ - - "<"
142
+ - !ruby/object:Gem::Version
143
+ version: 2.7.0.preview1
141
144
  required_rubygems_version: !ruby/object:Gem::Requirement
142
145
  requirements:
143
146
  - - ">="