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
+3 -3
View File
@@ -101,10 +101,10 @@ module Liquid
def map(input, property) def map(input, property)
ary = if input.is_a?(Array) ary = if input.is_a?(Array)
input.flatten input.flatten
elsif !input.class.include?(Enumerable) elsif input.kind_of?(Enumerable)
[input].flatten
else
input input
else
[input].flatten
end end
ary.map do |e| ary.map do |e|