Use idiomatic #is_a? method instead of #class ==

This commit is contained in:
Parker Moore 2013-12-26 01:28:58 -05:00
parent 39e4d6b3ba
commit 6ca731c13b
1 changed files with 1 additions and 1 deletions

View File

@ -186,7 +186,7 @@ module Jekyll
#
# Returns the filtered array of objects
def where(input, key, value)
return input unless input.class == Array
return input unless input.is_a?(Array)
input.select { |object| object[key] == value }
end