summaryrefslogtreecommitdiff
path: root/lib/cgi/cookie.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/cgi/cookie.rb')
-rw-r--r--lib/cgi/cookie.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/cgi/cookie.rb b/lib/cgi/cookie.rb
index 4cc050b..a2155ed 100644
--- a/lib/cgi/cookie.rb
+++ b/lib/cgi/cookie.rb
@@ -1,4 +1,4 @@
-# frozen_string_literal: false
+# frozen_string_literal: true
require 'cgi/util'
class CGI
# Class representing an HTTP cookie.
@@ -143,7 +143,7 @@ class CGI
# Convert the Cookie to its string representation.
def to_s
val = collect{|v| CGI.escape(v) }.join("&")
- buf = "#{@name}=#{val}"
+ buf = "#{@name}=#{val}".dup
buf << "; domain=#{@domain}" if @domain
buf << "; path=#{@path}" if @path
buf << "; expires=#{CGI::rfc1123_date(@expires)}" if @expires