Skip to content

Fix cycle tags with variable arguments - #2128

Open
efegokdemir wants to merge 1 commit into
Shopify:mainfrom
efegokdemir:codex/fix-cycle-variable-2123
Open

efegokdemir wants to merge 1 commit into
Shopify:mainfrom
efegokdemir:codex/fix-cycle-variable-2123

Conversation

@efegokdemir

Copy link
Copy Markdown

Summary

  • Build unnamed cycle keys from lookup paths instead of lookup object identity, so repeated tags with the same variable expressions share and advance their cycle counter.
  • Add regression coverage for the reported undefined-variable case and for a defined first value.
  • Update the existing lookup-cycle expectation to reflect the shared-counter behavior requested in the issue.

This intentionally changes the prior per-tag counter behavior for identical lookup expressions; repeated unnamed cycle tags now behave consistently with literal cycles.

Fixes #2123

Tests

  • PATH=/opt/homebrew/opt/ruby/bin:$PATH BUNDLE_WITHOUT=spec bundle exec ruby -Itest test/integration/tags/cycle_tag_test.rb — 13 runs, 57 assertions passed.
  • PATH=/opt/homebrew/opt/ruby/bin:$PATH bundle exec rake — all unit/integration modes and RuboCop passed.
  • git diff --check — passed.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

{% cycle %} with an unquoted variable as its first argument never advances

1 participant