mirror of
https://github.com/Shopify/liquid.git
synced 2026-09-12 23:40:45 -07:00
avoid a hash comparison
This commit is contained in:
@@ -135,9 +135,9 @@ module Liquid
|
||||
# end
|
||||
#
|
||||
# context['var] #=> nil
|
||||
def stack(new_scope={})
|
||||
def stack(new_scope=nil)
|
||||
old_stack_used = @this_stack_used
|
||||
@this_stack_used = (new_scope != {})
|
||||
@this_stack_used = (new_scope != nil)
|
||||
push(new_scope) if @this_stack_used
|
||||
yield
|
||||
ensure
|
||||
|
||||
Reference in New Issue
Block a user