Use reject rather than dup and delete.

This commit is contained in:
Dylan Thacker-Smith
2015-07-08 19:27:24 -04:00
parent c45310170b
commit 73834a7e52
+1 -3
View File
@@ -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