Permalink
Browse files

Use String#<< over +=

  • Loading branch information...
1 parent 4c58e4d commit 4ed9e61a74c2157b56d950e812e9b672d859a0c4 @ender672 ender672 committed Jan 30, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 lib/rack/session/cookie.rb
@@ -136,7 +136,7 @@ def set_session(env, session_id, session, options)
session_data = coder.encode(session)
if @secrets.first
- session_data = "#{session_data}--#{generate_hmac(session_data, @secrets.first)}"
+ session_data << "--#{generate_hmac(session_data, @secrets.first)}"
end
if session_data.size > (4096 - @key.size)

0 comments on commit 4ed9e61

Please sign in to comment.