Correct method definition according to Ruby documentation (https://ruby-doc.org/core-2.4.1/Object.html#method-i-respond_to-3F) is:
respond_to?(string, include_all=false) → true or false Rack started using second argument starting from version 2: https://github.com/rack/rack/blob/master/lib/rack/body_proxy.rb#L14 If raindrops is used in Rack 2+ applications, an exception is raised: ArgumentError: wrong number of arguments (2 for 1) <ROOT>/gems/raindrops-0.18.0/lib/raindrops/middleware/proxy.rb:30:in `respond_to?' <ROOT>/gems/rack-2.0.3/lib/rack/body_proxy.rb:14:in `respond_to?' --- lib/raindrops/middleware/proxy.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/raindrops/middleware/proxy.rb b/lib/raindrops/middleware/proxy.rb index 1cf437c..a7c8e66 100644 --- a/lib/raindrops/middleware/proxy.rb +++ b/lib/raindrops/middleware/proxy.rb @@ -27,9 +27,9 @@ def to_path # Rack servers use +respond_to?+ to check for the presence of +close+ # and +to_path+ methods. - def respond_to?(m) + def respond_to?(m, include_all = false) m = m.to_sym - :close == m || @body.respond_to?(m) + :close == m || @body.respond_to?(m, include_all) end # Avoid breaking users of non-standard extensions (e.g. #body) -- 2.13.2