summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--state.rb3
1 files changed, 2 insertions, 1 deletions
diff --git a/state.rb b/state.rb
index 23bf463..88291ae 100644
--- a/state.rb
+++ b/state.rb
@@ -305,7 +305,8 @@ class State
unless candidates == []
candidates = candidates[0].product(*candidates[1..-1]).map{ |x| x.to_set } \
- .select{ |x| x.size == 0 or x.inject(true){ |st, y| st and y.rooted_in x } }
+ .select{ |x| x.size == 0 or x.inject(true){ |st, y| st and y.rooted_in x } } \
+ .select{ |x| x.map{ |y| y.params.to_a }.inject([]){ |a, b| a + b }.uniq.map{ |y| y[0] }.is_uniq? }
else
candidates = [Set.new]
end