diff options
author | nagachika <nagachika@ruby-lang.org> | 2022-11-22 20:55:17 +0900 |
---|---|---|
committer | nagachika <nagachika@ruby-lang.org> | 2022-11-22 20:55:17 +0900 |
commit | 8f2586f1985041b8be33358052fa647d02bf2aea (patch) | |
tree | 952ac6a4fea8393fa8e167863d8d53178a322de9 | |
parent | 012015d762d000966a33fcea5f3069decd9d4007 (diff) |
merge revision(s) 36f297e62108072b9377d927321928b994f66a93:
Use valid tokens as cookie names
---
spec/ruby/library/cgi/cookie/name_spec.rb | 12 ++++++------
spec/ruby/library/cgi/cookie/parse_spec.rb | 10 +++++-----
2 files changed, 11 insertions(+), 11 deletions(-)
-rw-r--r-- | spec/ruby/library/cgi/cookie/name_spec.rb | 12 | ||||
-rw-r--r-- | spec/ruby/library/cgi/cookie/parse_spec.rb | 10 | ||||
-rw-r--r-- | version.h | 4 |
3 files changed, 13 insertions, 13 deletions
diff --git a/spec/ruby/library/cgi/cookie/name_spec.rb b/spec/ruby/library/cgi/cookie/name_spec.rb index 14226824c8..326a43ade3 100644 --- a/spec/ruby/library/cgi/cookie/name_spec.rb +++ b/spec/ruby/library/cgi/cookie/name_spec.rb @@ -6,18 +6,18 @@ describe "CGI::Cookie#name" do cookie = CGI::Cookie.new("test-cookie") cookie.name.should == "test-cookie" - cookie = CGI::Cookie.new("name" => "another cookie") - cookie.name.should == "another cookie" + cookie = CGI::Cookie.new("name" => "another-cookie") + cookie.name.should == "another-cookie" end end describe "CGI::Cookie#name=" do it "sets self's expiration date" do cookie = CGI::Cookie.new("test-cookie") - cookie.name = "another name" - cookie.name.should == "another name" + cookie.name = "another-name" + cookie.name.should == "another-name" - cookie.name = "and one more" - cookie.name.should == "and one more" + cookie.name = "and-one-more" + cookie.name.should == "and-one-more" end end diff --git a/spec/ruby/library/cgi/cookie/parse_spec.rb b/spec/ruby/library/cgi/cookie/parse_spec.rb index 90d2c3d148..d484c7bad9 100644 --- a/spec/ruby/library/cgi/cookie/parse_spec.rb +++ b/spec/ruby/library/cgi/cookie/parse_spec.rb @@ -6,16 +6,16 @@ describe "CGI::Cookie.parse" do expected = { "test-cookie" => ["one", "two", "three"] } CGI::Cookie.parse("test-cookie=one&two&three").should == expected - expected = { "second cookie" => ["three", "four"], "first cookie" => ["one", "two"] } - CGI::Cookie.parse("first cookie=one&two;second cookie=three&four").should == expected + expected = { "second-cookie" => ["three", "four"], "first-cookie" => ["one", "two"] } + CGI::Cookie.parse("first-cookie=one&two;second-cookie=three&four").should == expected end it "does not use , for cookie separators" do expected = { - "first cookie" => ["one", "two"], - "second cookie" => ["three", "four,third_cookie=five", "six"] + "first-cookie" => ["one", "two"], + "second-cookie" => ["three", "four,third_cookie=five", "six"] } - CGI::Cookie.parse("first cookie=one&two;second cookie=three&four,third_cookie=five&six").should == expected + CGI::Cookie.parse("first-cookie=one&two;second-cookie=three&four,third_cookie=five&six").should == expected end it "unescapes the Cookie values" do @@ -11,11 +11,11 @@ # define RUBY_VERSION_MINOR RUBY_API_VERSION_MINOR #define RUBY_VERSION_TEENY 3 #define RUBY_RELEASE_DATE RUBY_RELEASE_YEAR_STR"-"RUBY_RELEASE_MONTH_STR"-"RUBY_RELEASE_DAY_STR -#define RUBY_PATCHLEVEL 182 +#define RUBY_PATCHLEVEL 183 #define RUBY_RELEASE_YEAR 2022 #define RUBY_RELEASE_MONTH 11 -#define RUBY_RELEASE_DAY 13 +#define RUBY_RELEASE_DAY 22 #include "ruby/version.h" |