From e749869fb7d3b829d2bd35f39ac30064674d77d8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9my=20Zurcher?= Date: Tue, 20 Aug 2024 15:02:07 +0200 Subject: simplify call to Response.finish --- lib/zorglub/node.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/zorglub/node.rb b/lib/zorglub/node.rb index ad5b751..69ecc20 100644 --- a/lib/zorglub/node.rb +++ b/lib/zorglub/node.rb @@ -154,7 +154,7 @@ module Zorglub status = options[:status] || 302 body = options[:body] || redirect_body(target) header = response.headers.merge('Location' => target.to_s) - throw :stop_realize, Rack::Response.new(body, status, header, &block).finish + throw :stop_realize, Rack::Response.new(body, status, header, &block) end def redirect_body(target) @@ -277,8 +277,8 @@ module Zorglub feed! response.write @content response.headers['content-type'] ||= @mime || 'text/html' - response.finish - end + response + end.finish end def feed!(no_hooks = false) -- cgit v1.1-2-g2b99