mirror of
https://github.com/jekyll/jekyll.git
synced 2026-04-06 03:01:43 -04:00
minimize array allocations in the where filter (#6860)
Merge pull request 6860
This commit is contained in:
@@ -174,7 +174,7 @@ module Jekyll
|
||||
return input unless input.respond_to?(:select)
|
||||
input = input.values if input.is_a?(Hash)
|
||||
input.select do |object|
|
||||
Array(item_property(object, property)).map(&:to_s).include?(value.to_s)
|
||||
Array(item_property(object, property)).map!(&:to_s).include?(value.to_s)
|
||||
end || []
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user