Use kind_of? instead of class.include? and rearrange stuff

This commit is contained in:
Florian Weingarten
2013-07-26 11:34:00 -04:00
parent 1af28a6eb8
commit 07f7d63bea

View File

@@ -101,10 +101,10 @@ module Liquid
def map(input, property)
ary = if input.is_a?(Array)
input.flatten
elsif !input.class.include?(Enumerable)
[input].flatten
else
elsif input.kind_of?(Enumerable)
input
else
[input].flatten
end
ary.map do |e|