mirror of
https://github.com/Shopify/liquid.git
synced 2026-10-03 00:55:11 -07:00
Set Context#initialize instance variables before squashing assigns (#1307)
This commit is contained in:
@@ -34,17 +34,18 @@ module Liquid
|
|||||||
@strict_variables = false
|
@strict_variables = false
|
||||||
@resource_limits = resource_limits || ResourceLimits.new(Template.default_resource_limits)
|
@resource_limits = resource_limits || ResourceLimits.new(Template.default_resource_limits)
|
||||||
@base_scope_depth = 0
|
@base_scope_depth = 0
|
||||||
squash_instance_assigns_with_environments
|
@interrupts = []
|
||||||
|
@filters = []
|
||||||
|
@global_filter = nil
|
||||||
|
@disabled_tags = {}
|
||||||
|
|
||||||
self.exception_renderer = Template.default_exception_renderer
|
self.exception_renderer = Template.default_exception_renderer
|
||||||
if rethrow_errors
|
if rethrow_errors
|
||||||
self.exception_renderer = ->(_e) { raise }
|
self.exception_renderer = ->(_e) { raise }
|
||||||
end
|
end
|
||||||
|
|
||||||
@interrupts = []
|
# Do this last, since it could result in this object being passed to a Proc in the environment
|
||||||
@filters = []
|
squash_instance_assigns_with_environments
|
||||||
@global_filter = nil
|
|
||||||
@disabled_tags = {}
|
|
||||||
end
|
end
|
||||||
# rubocop:enable Metrics/ParameterLists
|
# rubocop:enable Metrics/ParameterLists
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user