From bbfcaa2cc07695123773fa64aad35b7e72e40528 Mon Sep 17 00:00:00 2001 From: Peter Zhu Date: Tue, 1 Dec 2020 14:38:04 -0500 Subject: [PATCH] Revert "Merge pull request #1350 from Shopify/pz-instrument-invalid-end-tag" This reverts commit e6eef4b2c40f54d03aceffd0d8ab5f2da90db5b7, reversing changes made to c7c21e88f018af6a02095cd8161d065d2967ea21. --- lib/liquid/block.rb | 3 --- test/integration/block_test.rb | 20 -------------------- 2 files changed, 23 deletions(-) diff --git a/lib/liquid/block.rb b/lib/liquid/block.rb index c74f7c2..dc22a47 100644 --- a/lib/liquid/block.rb +++ b/lib/liquid/block.rb @@ -77,9 +77,6 @@ module Liquid body.parse(tokens, parse_context) do |end_tag_name, end_tag_params| @blank &&= body.blank? - # Instrument for bug 1346 - Usage.increment("end_tag_params") if end_tag_params && !end_tag_params.empty? - return false if end_tag_name == block_delimiter raise_tag_never_closed(block_name) unless end_tag_name diff --git a/test/integration/block_test.rb b/test/integration/block_test.rb index 91569b5..5cc2aa4 100644 --- a/test/integration/block_test.rb +++ b/test/integration/block_test.rb @@ -55,24 +55,4 @@ class BlockTest < Minitest::Test assert_equal buf.object_id, output.object_id end end - - def test_instrument_for_bug_1346 - calls = [] - Liquid::Usage.stub(:increment, ->(name) { calls << name }) do - Liquid::Template.parse("{% for i in (1..2) %}{{ i }}{% endfor {% foo %}") - end - assert_equal(["end_tag_params"], calls) - - calls = [] - Liquid::Usage.stub(:increment, ->(name) { calls << name }) do - Liquid::Template.parse("{% for i in (1..2) %}{{ i }}{% endfor test %}") - end - assert_equal(["end_tag_params"], calls) - - calls = [] - Liquid::Usage.stub(:increment, ->(name) { calls << name }) do - Liquid::Template.parse("{% for i in (1..2) %}{{ i }}{% endfor %}") - end - assert_equal([], calls) - end end