From f6298d99f7af146f6b2b03444849282c1a524752 Mon Sep 17 00:00:00 2001 From: Ian Ker-Seymer Date: Mon, 27 Apr 2026 15:15:12 -0400 Subject: [PATCH] Fix deep_instantiate to strip trailing colon from class name --- lib/liquid/spec/lazy_spec.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/liquid/spec/lazy_spec.rb b/lib/liquid/spec/lazy_spec.rb index 90ac579..8c37efe 100644 --- a/lib/liquid/spec/lazy_spec.rb +++ b/lib/liquid/spec/lazy_spec.rb @@ -300,7 +300,7 @@ def deep_instantiate(obj, seen = {}.compare_by_identity) key = obj.keys.first value = obj.values.first if key.is_a?(String) && key.start_with?("instantiate:") - class_name = key.sub("instantiate:", "") + class_name = key.sub("instantiate:", "").chomp(":") # Deep instantiate the parameters first params = deep_instantiate(value, seen) # Create a fresh instance via the registry