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