predicate 1.3.3 → 1.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
  SHA1:
3
- metadata.gz: d0640cc584c97fcc3284e49a237ed100eafb99b6
4
- data.tar.gz: 477609b676466dd9e6a43e36740929e4ab660d81
3
+ metadata.gz: e429a75b5eeee0831bc034adf4f541277eff98aa
4
+ data.tar.gz: 7186388fb19923f92f5617a7c33e9e070111630f
5
5
  SHA512:
6
- metadata.gz: 31a4d9754d7b1c7be5ecc4703cd2b1b6ecfdeab6616e736b3754e276c48468881b79420475d64aa5acf265007daf0fe3309fe3e2cc5fcf69cd6a15f150d67b18
7
- data.tar.gz: 142229a63ac9c525b1fa90eaf6689a673db467ffd11b9b26c034d75d752ff93258198eb4030ca167effc75fde6573ab9e2a8ed9e4fc7b4e9e3729ff0a5e12e5a
6
+ metadata.gz: b3e1045f4fca26cc8eb11786bf211617f128294a2dbef01843061f16afed69395ba06c69a19e1e8762c81c6881d9fea535586609fac496f0c55659cdae89d59b
7
+ data.tar.gz: 5ff49f5827934a546e8df8b39e8dc95d8af354ccd82d0fef368d7bfa4e41ac3843ea95148e0305c84488103d4a9c6dec02826aff94039a4d8464503fa0256fc4
@@ -30,6 +30,7 @@ class Predicate
30
30
  end
31
31
 
32
32
  def in(identifier, values)
33
+ return contradiction if values.is_a?(Array) && values.empty?
33
34
  identifier = sexpr(identifier) if identifier.is_a?(Symbol)
34
35
  _factor_predicate([:in, identifier, values])
35
36
  end
@@ -2,7 +2,7 @@ class Predicate
2
2
  module Version
3
3
  MAJOR = 1
4
4
  MINOR = 3
5
- TINY = 3
5
+ TINY = 4
6
6
  end
7
7
  VERSION = "#{Version::MAJOR}.#{Version::MINOR}.#{Version::TINY}"
8
8
  end
@@ -58,6 +58,10 @@ describe "Predicate.in" do
58
58
  subject{ Predicate.in(:x, [2, 3]) }
59
59
 
60
60
  it_should_behave_like "a predicate"
61
+
62
+ it 'should lead to a contradiction if value list is empty' do
63
+ expect(Predicate.in(:x, [])).to eql(Predicate.contradiction)
64
+ end
61
65
  end
62
66
 
63
67
  describe "Predicate.among" do
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: predicate
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.3.3
4
+ version: 1.3.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Bernard Lambeau