lib/gecoder/interface/constraints/set/connection.rb in gecoder-with-gecode-1.0.0 vs lib/gecoder/interface/constraints/set/connection.rb in gecoder-with-gecode-1.1.0

- old
+ new

@@ -46,11 +46,12 @@ raise ArgumentError, 'At most one of the options :weights and ' + ':substitutions may be specified.' end case options.keys.first - when :substitutions: subs = options[:substitutions] - when :weights: + when :substitutions + subs = options[:substitutions] + when :weights weights = options[:weights] subs = Hash.new do |hash, key| if weights[key].nil? hash[key] = nil else