mirror of
https://github.com/Shopify/liquid.git
synced 2026-09-29 15:15:19 -07:00
Added method parens
This commit is contained in:
@@ -128,11 +128,11 @@ module Liquid
|
|||||||
ary = InputIterator.new(input)
|
ary = InputIterator.new(input)
|
||||||
|
|
||||||
if property.nil?
|
if property.nil?
|
||||||
ary.sort {|a,b| a.casecmp b }
|
ary.sort {|a,b| a.casecmp(b) }
|
||||||
elsif ary.first.respond_to?(:[]) && !ary.first[property].nil?
|
elsif ary.first.respond_to?(:[]) && !ary.first[property].nil?
|
||||||
ary.sort {|a,b| a[property].casecmp b[property] }
|
ary.sort {|a,b| a[property].casecmp(b[property]) }
|
||||||
elsif ary.first.respond_to?(property)
|
elsif ary.first.respond_to?(property)
|
||||||
ary.sort {|a,b| a.send(property).casecmp b.send(property) }
|
ary.sort {|a,b| a.send(property).casecmp(b.send(property)) }
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user