From e10ef6433f47f6152b776237c5f408e35c186dce Mon Sep 17 00:00:00 2001 From: Pat Allan Date: Sun, 21 May 2017 14:01:30 +1000 Subject: Update respond_to? calls for second argument. Rack (since v2) has started explicitly listing the second (optional) argument for respond_to?, which matches the underlying Ruby spec. This patch fixes the calls in both C and Ruby approaches. However, rb_respond_to only accepts a single argument - differing from the Ruby side of things - so perhaps this patch isn't quite perfect (and my C skills are very limited, so the whole thing could use a review). --- lib/clogger/pure.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib/clogger/pure.rb') diff --git a/lib/clogger/pure.rb b/lib/clogger/pure.rb index 77f81b4..fddfe79 100644 --- a/lib/clogger/pure.rb +++ b/lib/clogger/pure.rb @@ -77,8 +77,8 @@ class Clogger @logger.respond_to?(:fileno) ? @logger.fileno : nil end - def respond_to?(m) - :close == m.to_sym || @body.respond_to?(m) + def respond_to?(method, include_all=false) + :close == method.to_sym || @body.respond_to?(method, include_all) end def to_path -- cgit v1.2.3-24-ge0c7