ruleby 0.9.b1 → 0.9.b2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (2) hide show
  1. data/lib/dsl/ferrari.rb +10 -2
  2. metadata +1 -1
data/lib/dsl/ferrari.rb CHANGED
@@ -96,10 +96,18 @@ module Ruleby
96
96
  if or?
97
97
  patterns = []
98
98
  each do |c|
99
- c.flatten_patterns.each do |o|
100
- patterns << o
99
+ f = c.flatten_patterns
100
+ if f.and?
101
+ patterns << f
102
+ else
103
+ f.each do |o|
104
+ # i hope this is safe... not entirely sure
105
+ patterns << (o.size == 1 ? o.first : o)
106
+ # patterns << o
107
+ end
101
108
  end
102
109
  end
110
+
103
111
  Container.new(:or, *patterns)
104
112
  elsif and?
105
113
  patterns = []
metadata CHANGED
@@ -2,7 +2,7 @@
2
2
  name: ruleby
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease: 4
5
- version: 0.9.b1
5
+ version: 0.9.b2
6
6
  platform: ruby
7
7
  authors:
8
8
  - Joe Kutner