Skip to content

Commit ea864f1

Browse files
authored
Merge pull request #1951 from Shopify/actual-revert
Fully revert calling to_s on filter array
2 parents cc04892 + c34dd81 commit ea864f1

File tree

3 files changed

+4
-5
lines changed

3 files changed

+4
-5
lines changed

lib/liquid/standardfilters.rb

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -982,8 +982,6 @@ def filter_array(input, property, target_value, default_value = [], &block)
982982

983983
return default_value if ary.empty?
984984

985-
property = Utils.to_s(property)
986-
987985
block.call(ary) do |item|
988986
if target_value.nil?
989987
item[property]

lib/liquid/version.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,5 @@
22
# frozen_string_literal: true
33

44
module Liquid
5-
VERSION = "5.8.5"
5+
VERSION = "5.8.6"
66
end

test/integration/standard_filter_test.rb

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1054,10 +1054,11 @@ def test_where_with_empty_string_is_a_no_op
10541054

10551055
def test_where_with_nil_is_a_no_op
10561056
environment = { "array" => ["alpha", "beta", "gamma"] }
1057-
expected_output = "alpha beta gamma"
10581057
template = "{{ array | where: nil | join: ' ' }}"
10591058

1060-
assert_template_result(expected_output, template, environment)
1059+
assert_raises(Liquid::ArgumentError) do
1060+
assert_template_result("alpha beta gamma", template, environment)
1061+
end
10611062
end
10621063

10631064
def test_where_with_value

0 commit comments

Comments
 (0)