diff --git a/lib/liquid/context.rb b/lib/liquid/context.rb index 0737f74..2dcb60c 100644 --- a/lib/liquid/context.rb +++ b/lib/liquid/context.rb @@ -34,7 +34,6 @@ module Liquid @strict_variables = false @resource_limits = resource_limits || ResourceLimits.new(Template.default_resource_limits) @base_scope_depth = 0 - squash_instance_assigns_with_environments self.exception_renderer = Template.default_exception_renderer if rethrow_errors @@ -246,16 +245,5 @@ module Liquid rescue Liquid::InternalError => exc exc end - - def squash_instance_assigns_with_environments - @scopes.last.each_key do |k| - @environments.each do |env| - if env.key?(k) - scopes.last[k] = lookup_and_evaluate(env, k) - break - end - end - end - end # squash_instance_assigns_with_environments end # Context end # Liquid diff --git a/test/integration/template_test.rb b/test/integration/template_test.rb index acac7f3..28536de 100644 --- a/test/integration/template_test.rb +++ b/test/integration/template_test.rb @@ -52,10 +52,7 @@ class TemplateTest < Minitest::Test t = Template.new assert_equal('from custom assigns', t.parse("{{ foo }}").render!('foo' => 'from custom assigns')) assert_equal('', t.parse("{{ foo }}").render!) - end - def test_custom_assigns_squash_instance_assigns - t = Template.new assert_equal('from instance assigns', t.parse("{% assign foo = 'from instance assigns' %}{{ foo }}").render!) assert_equal('from custom assigns', t.parse("{{ foo }}").render!('foo' => 'from custom assigns')) end