summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog5
-rw-r--r--lib/cgi.rb14
-rw-r--r--version.h2
3 files changed, 13 insertions, 8 deletions
diff --git a/ChangeLog b/ChangeLog
index 0b12068d7e..18f64f81e3 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+Tue Nov 17 16:04:02 2009 Marc-Andre Lafortune <ruby-core@marc-andre.ca>
+
+ * lib/cgi/cookie.rb (value): Keep CGI::Cookie#value in sync with the
+ cookie itself. A patch by Arthur Schreiber [ruby-core:17634]
+
Tue Nov 17 15:49:00 2009 Marc-Andre Lafortune <ruby-core@marc-andre.ca>
* lib/irb/ext/multi-irb.rb: Fix arguments handling for shell commands
diff --git a/lib/cgi.rb b/lib/cgi.rb
index 5d74aa08ff..c999503a59 100644
--- a/lib/cgi.rb
+++ b/lib/cgi.rb
@@ -822,8 +822,8 @@ class CGI
super(@value)
end
- attr_accessor("name", "value", "path", "domain", "expires")
- attr_reader("secure")
+ attr_accessor("name", "path", "domain", "expires")
+ attr_reader("secure", "value")
# Set whether the Cookie is a secure cookie or not.
#
@@ -833,16 +833,16 @@ class CGI
@secure
end
+ def value=(val)
+ @value.replace(Array(val))
+ end
+
# Convert the Cookie to its string representation.
def to_s
buf = ""
buf += @name + '='
- if @value.kind_of?(String)
- buf += CGI::escape(@value)
- else
- buf += @value.collect{|v| CGI::escape(v) }.join("&")
- end
+ buf += @value.map { |v| CGI::escape(v) }.join("&")
if @domain
buf += '; domain=' + @domain
diff --git a/version.h b/version.h
index 5b8ae73820..f7794c1bfd 100644
--- a/version.h
+++ b/version.h
@@ -2,7 +2,7 @@
#define RUBY_RELEASE_DATE "2009-11-17"
#define RUBY_VERSION_CODE 187
#define RUBY_RELEASE_CODE 20091117
-#define RUBY_PATCHLEVEL 208
+#define RUBY_PATCHLEVEL 209
#define RUBY_VERSION_MAJOR 1
#define RUBY_VERSION_MINOR 8