Use {} notation

This commit is contained in:
Maxime Bedard
2017-09-20 09:48:23 -04:00
parent a796c17f8b
commit f761d21215
2 changed files with 2 additions and 2 deletions

View File

@@ -30,7 +30,7 @@ module Liquid
end
def render(context)
context.registers[:cycle] ||= Hash.new
context.registers[:cycle] ||= {}
context.stack do
key = context.evaluate(@name)

View File

@@ -120,7 +120,7 @@ module Liquid
private
def collection_segment(context)
offsets = context.registers[:for] ||= Hash.new
offsets = context.registers[:for] ||= {}
from = if @from == :continue
offsets[@name].to_i