Skip to content

Commit

Permalink
Reduce proc call
Browse files Browse the repository at this point in the history
  • Loading branch information
amatsuda committed Sep 13, 2019
1 parent ed1e719 commit 090aa9e
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions actionpack/lib/action_dispatch/middleware/cookies.rb
Original file line number Diff line number Diff line change
Expand Up @@ -286,9 +286,9 @@ class CookieJar #:nodoc:
DOMAIN_REGEXP = /[^.]*\.([^.]*|..\...|...\...)$/

def self.build(req, cookies)
new(req).tap do |jar|
jar.update(cookies)
end
jar = new(req)
jar.update(cookies)
jar
end

attr_reader :request
Expand Down

0 comments on commit 090aa9e

Please sign in to comment.