Skip to content

Commit

Permalink
Add begin/ensure block since we are returning.
Browse files Browse the repository at this point in the history
  • Loading branch information
josevalim committed Jan 14, 2012
1 parent b1e5551 commit 591fcba
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions actionpack/lib/action_dispatch/middleware/body_proxy.rb
Expand Up @@ -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?
Expand Down

0 comments on commit 591fcba

Please sign in to comment.