Open
Description
Noting that documentation for the cycle
tag only mentions cycling through lists of strings, and existing integration tests cover cycling through lists of integers, is the behaviour demonstrated by the following example considered a bug?
require 'liquid'
template = Liquid::Template.parse(
"{% cycle a, b, c %} {% cycle a, b, c %} {% cycle a, b, c %}")
puts(template.render!({"a" => 1, "b" => 2, "c" => 3}))
Output:
1 1 1
Expected Output:
1 2 3
I can see that the cycle tag was changed with this commit to parse cycle arguments as expressions, rather than treating them as strings. It appears that a string representation of objects returned from parse_expression()
doesn't make a good context key.