Skip to content

Instantly share code, notes, and snippets.

@headius

headius/.diff Secret

Created November 23, 2022 23:06
Show Gist options
  • Save headius/73216dab951d65c2a1fb9584a24c7c46 to your computer and use it in GitHub Desktop.
Save headius/73216dab951d65c2a1fb9584a24c7c46 to your computer and use it in GitHub Desktop.
diff --git a/test/cgi/test_cgi_cookie.rb b/test/cgi/test_cgi_cookie.rb
index e3ec4be..6ea8228 100644
--- a/test/cgi/test_cgi_cookie.rb
+++ b/test/cgi/test_cgi_cookie.rb
@@ -62,18 +62,18 @@ class CGICookieTest < Test::Unit::TestCase
def test_cgi_cookie_new_with_domain
h = {'name'=>'name1', 'value'=>'value1'}
- cookie = CGI::Cookie.new('domain'=>'a.example.com', **h)
+ cookie = CGI::Cookie.new({'domain'=>'a.example.com'}.merge(h))
assert_equal('a.example.com', cookie.domain)
- cookie = CGI::Cookie.new('domain'=>'1.example.com', **h)
+ cookie = CGI::Cookie.new({'domain'=>'1.example.com'}.merge(h))
assert_equal('1.example.com', cookie.domain, 'enhanced by RFC 1123')
assert_raise(ArgumentError) {
- CGI::Cookie.new('domain'=>'-a.example.com', **h)
+ CGI::Cookie.new({'domain'=>'-a.example.com'}.merge(h))
}
assert_raise(ArgumentError) {
- CGI::Cookie.new('domain'=>'a-.example.com', **h)
+ CGI::Cookie.new({'domain'=>'a-.example.com'}.merge(h))
}
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment