Skip to content

Commit

Permalink
Remove Liquid.cache_classes option (#1847)
Browse files Browse the repository at this point in the history
  • Loading branch information
ianks authored Nov 4, 2024
1 parent 8d86613 commit b0cba0b
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 22 deletions.
3 changes: 0 additions & 3 deletions lib/liquid.rb
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,6 @@ module Liquid
VariableParser = /\[(?>[^\[\]]+|\g<0>)*\]|#{VariableSegment}+\??/o

RAISE_EXCEPTION_LAMBDA = ->(_e) { raise }

singleton_class.send(:attr_accessor, :cache_classes)
self.cache_classes = true
end

require "liquid/version"
Expand Down
19 changes: 0 additions & 19 deletions test/unit/template_unit_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -20,25 +20,6 @@ def test_sets_default_localization_in_context_with_quick_initialization
assert_equal(fixture("en_locale.yml"), locale.path)
end

def test_with_cache_classes_tags_returns_the_same_class
original_cache_setting = Liquid.cache_classes
Liquid.cache_classes = true

original_klass = Class.new
Object.send(:const_set, :CustomTag, original_klass)
Template.register_tag('custom', CustomTag)

Object.send(:remove_const, :CustomTag)

new_klass = Class.new
Object.send(:const_set, :CustomTag, new_klass)

assert(Template.tags['custom'].equal?(original_klass))
ensure
Object.send(:remove_const, :CustomTag)
Liquid.cache_classes = original_cache_setting
end

class FakeTag; end

def test_tags_can_be_looped_over
Expand Down

1 comment on commit b0cba0b

@espen
Copy link

@espen espen commented on b0cba0b Dec 21, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should probably be added to history.md as breaking change.

Please sign in to comment.