predicate 2.3.0 → 2.3.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/predicate/nodes/dyadic_comp.rb +2 -2
- data/lib/predicate/nodes/eq.rb +2 -3
- data/lib/predicate/nodes/in.rb +2 -2
- data/lib/predicate/version.rb +1 -1
- data/spec/nodes/eq/test_and.rb +6 -0
- metadata +3 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4dfe13a9bf0be96cb22edabb43b170e58b312787bfb5f7af5e1f23cbf4d99f20
|
4
|
+
data.tar.gz: f27cd571b7d17b57d4e35cf2001062498e8a8b3b75a76cc9db3bbf235c3786e7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2aecdcbadfa7eee6a469ce56f2432cfd9f25cc3f5e4aaae882841d01178d4727ff1289d9bc47fb1ec14d2bb20f6ec4d53b1af4283037b72a3be4842111e56699
|
7
|
+
data.tar.gz: 96bc8391a261ba1587a146248e5f37947c136f98cdd3352ed50554ea10b8056338355c5a722b87e3df553300a3b6761a19be576d741f6c2d7519f76e3fa25550
|
@@ -22,8 +22,8 @@ class Predicate
|
|
22
22
|
@free_variables ||= left.free_variables | right.free_variables
|
23
23
|
end
|
24
24
|
|
25
|
-
def
|
26
|
-
left.identifier? && right.literal?
|
25
|
+
def var_against_literal_value?
|
26
|
+
left.identifier? && right.literal? && !right.has_placeholder?
|
27
27
|
end
|
28
28
|
|
29
29
|
end
|
data/lib/predicate/nodes/eq.rb
CHANGED
@@ -13,9 +13,8 @@ class Predicate
|
|
13
13
|
return self if constants == other.constants
|
14
14
|
return contradiction
|
15
15
|
when In
|
16
|
-
return super unless
|
17
|
-
mine = self.right.value
|
18
|
-
hers = other.right.value
|
16
|
+
return super unless var_against_literal_value? && other.var_against_literal_value?
|
17
|
+
mine, hers = self.right.value, other.right.value
|
19
18
|
return self if hers.include?(mine)
|
20
19
|
contradiction
|
21
20
|
else
|
data/lib/predicate/nodes/in.rb
CHANGED
data/lib/predicate/version.rb
CHANGED
data/spec/nodes/eq/test_and.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: predicate
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.3.
|
4
|
+
version: 2.3.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Bernard Lambeau
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-04-
|
11
|
+
date: 2020-04-29 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: sexpr
|
@@ -206,8 +206,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
206
206
|
- !ruby/object:Gem::Version
|
207
207
|
version: '0'
|
208
208
|
requirements: []
|
209
|
-
|
210
|
-
rubygems_version: 2.7.6
|
209
|
+
rubygems_version: 3.1.2
|
211
210
|
signing_key:
|
212
211
|
specification_version: 4
|
213
212
|
summary: Predicate provides a simple class and processors to encode and manipulate
|