lib/dentaku/calculator.rb in dentaku-3.2.0 vs lib/dentaku/calculator.rb in dentaku-3.2.1
- old
+ new
@@ -44,10 +44,10 @@
@disable_ast_cache = false
end
def evaluate(expression, data = {}, &block)
evaluate!(expression, data)
- rescue UnboundVariableError, Dentaku::ArgumentError => ex
+ rescue Dentaku::Error, Dentaku::ArgumentError, Dentaku::ZeroDivisionError => ex
block.call(expression, ex) if block_given?
end
def evaluate!(expression, data = {}, &block)
return expression.map { |e|