From f2e6adf566a1144fb9c46d1ba2497cc50969fea8 Mon Sep 17 00:00:00 2001 From: Justin Li Date: Mon, 1 Feb 2016 11:38:40 -0500 Subject: [PATCH] Remove arbitrary send vector --- lib/liquid/standardfilters.rb | 6 ------ 1 file changed, 6 deletions(-) diff --git a/lib/liquid/standardfilters.rb b/lib/liquid/standardfilters.rb index 651ea36..046b35a 100644 --- a/lib/liquid/standardfilters.rb +++ b/lib/liquid/standardfilters.rb @@ -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