Permalink
Browse files

Add begin/ensure block since we are returning.

  • Loading branch information...
1 parent b1e5551 commit 591fcbafcd2eea58ac2ede2bb4daed8c713d07da @josevalim josevalim committed Jan 14, 2012
Showing with 5 additions and 3 deletions.
  1. +5 −3 actionpack/lib/action_dispatch/middleware/body_proxy.rb
View
8 actionpack/lib/action_dispatch/middleware/body_proxy.rb
@@ -12,9 +12,11 @@ def respond_to?(*args)
def close
return if @closed
@closed = true
- @body.close if @body.respond_to? :close
- ensure
- @block.call
+ begin
+ @body.close if @body.respond_to? :close
+ ensure
+ @block.call
+ end
end
def closed?

0 comments on commit 591fcba

Please sign in to comment.