lib/predicate/processors/to_ruby_code.rb in predicate-1.2.0 vs lib/predicate/processors/to_ruby_code.rb in predicate-1.3.0

- old
+ new

@@ -48,10 +48,11 @@ def on_in(sexpr) "#{to_ruby_literal(sexpr.values)}.include?(#{apply(sexpr.identifier)})" end def on_intersect(sexpr) - "!(#{apply(sexpr.identifier)} & #{to_ruby_literal(sexpr.values)}).empty?" + t_x = apply(sexpr.identifier) + "!#{t_x}.nil? && !(#{t_x} & #{to_ruby_literal(sexpr.values)}).empty?" end def on_literal(sexpr) to_ruby_literal(sexpr.last) end