dry-types 0.10.1 → 0.10.2

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
  SHA1:
3
- metadata.gz: 9f7f3d17e795bd1fc9393df39d6388e47f20abd5
4
- data.tar.gz: caaa567b13b3806de44c36daa5f30d41579c6405
3
+ metadata.gz: 53fb09e4940435c6775c332c8b3dbcbbbe994f94
4
+ data.tar.gz: 561ee9baa73b623b678151b01d70f3a89040830f
5
5
  SHA512:
6
- metadata.gz: 2161c43f4f094bf12e4d5e2e64cd4d48b5a517ff1a3293a25bfda045bbfbe1fe1d7816d4f736e5273dbb4516947aa5342d854d8bab33c634f4c236ed9203e410
7
- data.tar.gz: 806dfa70f3950020943c46ee415710d2dc4e45355d3b087bbb8b2c33e6259bca1745a9400dd2f0c4b6f1df4c2d46427d8c02550540ce14e6aa1b2bc691dbd8fa
6
+ metadata.gz: e4d983849996f84999b48701afbb9e4aa93c598f534a05fcecce9e824a6c072d5817fd77455a2b2106d99d49cb8f89542b715ff2f0882b6e4d2c2ff61726bda0
7
+ data.tar.gz: b47ba832c1f69dd63a828d0afd915f5696f04124d40072a108d952b0443d4f3a8f78d4a30183c545c6d360ecb945f13d1ee7d04adfe411015c61c51d2b9895c3
@@ -1,3 +1,9 @@
1
+ # v0.10.2 to-be-released
2
+
3
+ ## Fixed
4
+
5
+ * Fixed `Type#optional?` for sum types (flash-gordon)
6
+
1
7
  # v0.10.1 2017-04-28
2
8
 
3
9
  ## Added
@@ -25,11 +25,6 @@ module Dry
25
25
  true
26
26
  end
27
27
 
28
- # @return [Boolean]
29
- def optional?
30
- left.primitive == NilClass
31
- end
32
-
33
28
  # @param [Object] input
34
29
  # @return [Object]
35
30
  # @raise [ConstraintError] if given +input+ not passing {#try}
@@ -72,7 +67,7 @@ module Dry
72
67
 
73
68
  # @return [Boolean]
74
69
  def optional?
75
- left.primitive == NilClass
70
+ left == Types['strict.nil']
76
71
  end
77
72
 
78
73
  # @param [Object] input
@@ -1,5 +1,5 @@
1
1
  module Dry
2
2
  module Types
3
- VERSION = '0.10.1'.freeze
3
+ VERSION = '0.10.2'.freeze
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dry-types
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.10.1
4
+ version: 0.10.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Piotr Solnica
@@ -270,7 +270,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
270
270
  version: '0'
271
271
  requirements: []
272
272
  rubyforge_project:
273
- rubygems_version: 2.6.9
273
+ rubygems_version: 2.6.11
274
274
  signing_key:
275
275
  specification_version: 4
276
276
  summary: Type system for Ruby supporting coercions, constraints and complex types