mirror of
https://github.com/Shopify/liquid.git
synced 2026-09-20 11:20:41 -07:00
Use reject rather than dup and delete.
This commit is contained in:
@@ -27,9 +27,7 @@ module Liquid
|
|||||||
if dont_pass == true
|
if dont_pass == true
|
||||||
{ locale: locale }
|
{ locale: locale }
|
||||||
elsif dont_pass.is_a?(Array)
|
elsif dont_pass.is_a?(Array)
|
||||||
opts = @template_options.dup
|
@template_options.reject { |k, v| dont_pass.include?(k) }
|
||||||
dont_pass.each { |o| opts.delete(o) }
|
|
||||||
opts
|
|
||||||
else
|
else
|
||||||
@template_options
|
@template_options
|
||||||
end
|
end
|
||||||
|
|||||||
Reference in New Issue
Block a user