From c0910f2bc553d45debf50c2438c77f009f547a9e Mon Sep 17 00:00:00 2001 From: Parker Moore Date: Tue, 17 May 2016 16:58:06 -0700 Subject: [PATCH] look up the content methods for drops in a smarter way --- lib/jekyll/drops/drop.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/jekyll/drops/drop.rb b/lib/jekyll/drops/drop.rb index 66945953..b798c27a 100644 --- a/lib/jekyll/drops/drop.rb +++ b/lib/jekyll/drops/drop.rb @@ -3,7 +3,7 @@ module Jekyll module Drops class Drop < Liquid::Drop - NON_CONTENT_METHODS = [:[], :[]=, :inspect, :to_h, :fallback_data, :to_s].freeze + NON_CONTENT_METHODS = [:fallback_data].freeze # Get or set whether the drop class is mutable. # Mutability determines whether or not pre-defined fields may be @@ -86,7 +86,7 @@ module Jekyll # Returns an Array of strings which represent method-specific keys. def content_methods @content_methods ||= ( - self.class.instance_methods(false) - NON_CONTENT_METHODS + self.class.instance_methods - Jekyll::Drops::Drop.instance_methods - NON_CONTENT_METHODS ).map(&:to_s).reject do |method| method.end_with?("=") end