From bdb9a4a47ffd2dcefd437d60b11471c57b346ca6 Mon Sep 17 00:00:00 2001 From: Dylan Thacker-Smith Date: Mon, 9 Nov 2015 15:03:36 -0500 Subject: [PATCH] Remove nil and empty string check in invoke_drop. --- lib/liquid/drop.rb | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/lib/liquid/drop.rb b/lib/liquid/drop.rb index a348958..0814532 100644 --- a/lib/liquid/drop.rb +++ b/lib/liquid/drop.rb @@ -23,8 +23,6 @@ module Liquid class Drop attr_writer :context - EMPTY_STRING = ''.freeze - # Catch all for the method def liquid_method_missing(_method) nil @@ -32,7 +30,7 @@ module Liquid # called by liquid to invoke a drop def invoke_drop(method_or_key) - if method_or_key && method_or_key != EMPTY_STRING && self.class.invokable?(method_or_key) + if self.class.invokable?(method_or_key) send(method_or_key) else liquid_method_missing(method_or_key)