Skip to content
This repository
Browse code

Add begin/ensure block since we are returning.

  • Loading branch information...
commit 591fcbafcd2eea58ac2ede2bb4daed8c713d07da 1 parent b1e5551
José Valim josevalim authored

Showing 1 changed file with 5 additions and 3 deletions. Show diff stats Hide diff stats

  1. +5 3 actionpack/lib/action_dispatch/middleware/body_proxy.rb
8 actionpack/lib/action_dispatch/middleware/body_proxy.rb
@@ -12,9 +12,11 @@ def respond_to?(*args)
12 12 def close
13 13 return if @closed
14 14 @closed = true
15   - @body.close if @body.respond_to? :close
16   - ensure
17   - @block.call
  15 + begin
  16 + @body.close if @body.respond_to? :close
  17 + ensure
  18 + @block.call
  19 + end
18 20 end
19 21
20 22 def closed?

0 comments on commit 591fcba

Please sign in to comment.
Something went wrong with that request. Please try again.