Permalink
Browse files

avoid ivars and extra array for response

This adds is needless overhead and prevents thread-safety when
used with a thread-safe Aggregate-like object is passed via
:aggregate on initialize.
  • Loading branch information...
Eric Wong
Eric Wong committed Feb 26, 2011
1 parent cc8a893 commit 5dd825137f5fa7dc7902a19425778114738b99d1
Showing with 2 additions and 2 deletions.
  1. +2 −2 lib/rack/aggregate/context.rb
@@ -31,10 +31,10 @@ def call(env)
end
start = Time.now
- @status, @headers, @response = @app.call(env)
+ response = @app.call(env)
@aggregate << (Time.now - start) * 1000
- [@status, @headers, @response]
+ response
end
end
end

0 comments on commit 5dd8251

Please sign in to comment.