mirror of
https://github.com/kemko/liquid.git
synced 2026-01-01 15:55:40 +03:00
Merge pull request #696 from Shopify/no-send
Remove possibility for arbitrary sends
This commit is contained in:
@@ -125,8 +125,6 @@ module Liquid
|
||||
[]
|
||||
elsif ary.first.respond_to?(:[]) && !ary.first[property].nil?
|
||||
ary.sort { |a, b| a[property] <=> b[property] }
|
||||
elsif ary.first.respond_to?(property)
|
||||
ary.sort { |a, b| a.send(property) <=> b.send(property) }
|
||||
end
|
||||
end
|
||||
|
||||
@@ -141,8 +139,6 @@ module Liquid
|
||||
[]
|
||||
elsif ary.first.respond_to?(:[]) && !ary.first[property].nil?
|
||||
ary.sort { |a, b| a[property].casecmp(b[property]) }
|
||||
elsif ary.first.respond_to?(property)
|
||||
ary.sort { |a, b| a.send(property).casecmp(b.send(property)) }
|
||||
end
|
||||
end
|
||||
|
||||
@@ -191,8 +187,6 @@ module Liquid
|
||||
[]
|
||||
elsif ary.first.respond_to?(:[])
|
||||
ary.reject{ |a| a[property].nil? }
|
||||
elsif ary.first.respond_to?(property)
|
||||
ary.reject { |a| a.send(property).nil? }
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user