lib/axiom/algebra/extension.rb in axiom-0.1.0 vs lib/axiom/algebra/extension.rb in axiom-0.1.1
- old
+ new
@@ -155,12 +155,12 @@
# the context to evaluate the function within
#
# @return [Extension]
#
# @api private
- def coerce_to_extensions(extensions = Undefined)
+ def coerce_to_extensions(extensions = Undefined, &block)
if extensions.equal?(Undefined)
- Evaluator::Context.new(header) { |context| yield context }.functions
+ header.context(&block).functions
else
extensions
end
end