mirror of
https://github.com/Shopify/liquid.git
synced 2026-10-03 00:55:11 -07:00
Add raggi's change to History, remove Ruby 1.8 code from test
This commit is contained in:
@@ -3,6 +3,7 @@
|
|||||||
## 3.0.0 / not yet released / branch "master"
|
## 3.0.0 / not yet released / branch "master"
|
||||||
|
|
||||||
* ...
|
* ...
|
||||||
|
* Add a class cache to avoid runtime extend calls, see #249 [James Tucker, raggi]
|
||||||
* Remove some legacy Ruby 1.8 compatibility code, see #276 [Florian Weingarten, fw42]
|
* Remove some legacy Ruby 1.8 compatibility code, see #276 [Florian Weingarten, fw42]
|
||||||
* Add default filter to standard filters, see #267 [Derrick Reimer, djreimer]
|
* Add default filter to standard filters, see #267 [Derrick Reimer, djreimer]
|
||||||
* Add optional strict parsing and warn parsing, see #235 [Tristan Hume, trishume]
|
* Add optional strict parsing and warn parsing, see #235 [Tristan Hume, trishume]
|
||||||
|
|||||||
@@ -41,8 +41,8 @@ module Liquid
|
|||||||
@@strainer_class_cache
|
@@strainer_class_cache
|
||||||
end
|
end
|
||||||
|
|
||||||
def self.create(context, filters = nil)
|
def self.create(context, filters = [])
|
||||||
filters = @@filters + (filters || [])
|
filters = @@filters + filters
|
||||||
strainer_class_cache[filters].new(context)
|
strainer_class_cache[filters].new(context)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
@@ -55,7 +55,7 @@ class StrainerTest < Test::Unit::TestCase
|
|||||||
assert_kind_of Strainer, strainer
|
assert_kind_of Strainer, strainer
|
||||||
assert_kind_of a, strainer
|
assert_kind_of a, strainer
|
||||||
assert_kind_of b, strainer
|
assert_kind_of b, strainer
|
||||||
Strainer.send(:class_variable_get, :@@filters).each do |m|
|
Strainer.class_variable_get(:@@filters).each do |m|
|
||||||
assert_kind_of m, strainer
|
assert_kind_of m, strainer
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
Reference in New Issue
Block a user