blood_contracts-core 0.3.3 → 0.3.4

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: 15d2c1262b54f96eb2eb15b4e342927fd45448781c0fca59a3ac76ace95a2409
4
- data.tar.gz: d47507f3401dc9c956d4a1922693eab12a207bb3a3f67ea7b5de398b5e2d0246
3
+ metadata.gz: b5255121f5462c13b32325514c3500cc7d2b69888ce2a463ec1d92ad3b73ada3
4
+ data.tar.gz: 9b1b380e6597fa8b2e853f0839eb36662a65ce99286146a0b6747ffe733b97db
5
5
  SHA512:
6
- metadata.gz: 6872bfc993b273b5d05713aa81f29c0a456cad1e8ebbbcd716055d04e15354c89c2fe7aba5d1a9bb2abbb165b82fc00e161b26c9437550e7a29581cba3ba62c7
7
- data.tar.gz: a8ebbd47519ef4bb94e343e01bd9fcbefae0a3f05a140a6218c2848b340da8bd51537fadc61339bf248dda5b0478bb3a88f5d3fd98e63f06f390c80788508436
6
+ metadata.gz: '029c4b29e22b82d4eb87da995d5cf73ee6747a97ac14e863298ffa650bcac3dcf46e0c7d7b5a9ee0c2d989d5c385c66914a4c4a6a28aebca6e2cce35eac457fb'
7
+ data.tar.gz: 1899a728a825fae6fd48d17ff68000718513a979676eef4b16f60b05edba654bdfdefa01c735626fb4e60e7adae164318c37b0b22232580d420cc77e94db9c05
@@ -20,7 +20,11 @@ module BloodContracts
20
20
  def or_a(other_type)
21
21
  sum = Class.new(Sum) { def inspect; super; end }
22
22
  new_sum = self.sum_of.to_a
23
- new_sum += other_type.sum_of.to_a if other_type.respond_to?(:sum_of)
23
+ if other_type.respond_to?(:sum_of)
24
+ new_sum += other_type.sum_of.to_a
25
+ else
26
+ new_sum << other_type
27
+ end
24
28
  sum.instance_variable_set(:@sum_of, ::Set.new(new_sum.compact))
25
29
  sum.instance_variable_set(:@finalized, true)
26
30
  sum
@@ -1,5 +1,5 @@
1
1
  module BloodContracts
2
2
  module Core
3
- VERSION = "0.3.3"
3
+ VERSION = "0.3.4"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: blood_contracts-core
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.3
4
+ version: 0.3.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sergey Dolganov
8
8
  autorequire:
9
9
  bindir: bin/
10
10
  cert_chain: []
11
- date: 2019-06-03 00:00:00.000000000 Z
11
+ date: 2019-06-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler