Fully revert calling to_s on filter array

This commit is contained in:
Marco Concetto Rudilosso
2025-04-14 17:36:45 +02:00
parent cc04892e54
commit c34dd812c5
3 changed files with 4 additions and 5 deletions
-2
View File
@@ -982,8 +982,6 @@ module Liquid
return default_value if ary.empty?
property = Utils.to_s(property)
block.call(ary) do |item|
if target_value.nil?
item[property]
+1 -1
View File
@@ -2,5 +2,5 @@
# frozen_string_literal: true
module Liquid
VERSION = "5.8.5"
VERSION = "5.8.6"
end
+3 -2
View File
@@ -1054,10 +1054,11 @@ class StandardFiltersTest < Minitest::Test
def test_where_with_nil_is_a_no_op
environment = { "array" => ["alpha", "beta", "gamma"] }
expected_output = "alpha beta gamma"
template = "{{ array | where: nil | join: ' ' }}"
assert_template_result(expected_output, template, environment)
assert_raises(Liquid::ArgumentError) do
assert_template_result("alpha beta gamma", template, environment)
end
end
def test_where_with_value