diff --git a/lib/liquid/htmltags.rb b/lib/liquid/htmltags.rb index dfb8c76..34d1796 100644 --- a/lib/liquid/htmltags.rb +++ b/lib/liquid/htmltags.rb @@ -46,7 +46,7 @@ module Liquid 'col0' => col, 'index0' => index, 'rindex' => length - index, - 'rindex0' => length - index -1, + 'rindex0' => length - index - 1, 'first' => (index == 0), 'last' => (index == length - 1), 'col_first' => (col == 0), diff --git a/lib/liquid/tags/for.rb b/lib/liquid/tags/for.rb index a2ece81..2d4366b 100644 --- a/lib/liquid/tags/for.rb +++ b/lib/liquid/tags/for.rb @@ -110,7 +110,7 @@ module Liquid 'index' => index + 1, 'index0' => index, 'rindex' => length - index, - 'rindex0' => length - index -1, + 'rindex0' => length - index - 1, 'first' => (index == 0), 'last' => (index == length - 1) }