Skip to content

Commit 05f0c58

Browse files
committed
Fix test_cgi_cookie_new_with_domain to pass on older rubies
1 parent daf88c2 commit 05f0c58

File tree

2 files changed

+7
-4
lines changed

2 files changed

+7
-4
lines changed

.github/workflows/test.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ on: [push, pull_request]
55
jobs:
66
ruby-versions:
77
runs-on: ubuntu-latest
8+
strategy:
9+
fail-fast: false
810
outputs:
911
versions: ${{ steps.versions.outputs.value }}
1012
steps:
@@ -16,6 +18,7 @@ jobs:
1618
needs: ruby-versions
1719
name: build (${{ matrix.ruby }} / ${{ matrix.os }})
1820
strategy:
21+
fail-fast: false
1922
matrix:
2023
ruby: ${{ fromJson(needs.ruby-versions.outputs.versions) }}
2124
os: [ ubuntu-latest, macos-latest, windows-latest ]

test/cgi/test_cgi_cookie.rb

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -62,18 +62,18 @@ def test_cgi_cookie_new_complex
6262

6363
def test_cgi_cookie_new_with_domain
6464
h = {'name'=>'name1', 'value'=>'value1'}
65-
cookie = CGI::Cookie.new('domain'=>'a.example.com', **h)
65+
cookie = CGI::Cookie.new(h.merge('domain'=>'a.example.com'))
6666
assert_equal('a.example.com', cookie.domain)
6767

68-
cookie = CGI::Cookie.new('domain'=>'1.example.com', **h)
68+
cookie = CGI::Cookie.new(h.merge('domain'=>'1.example.com'))
6969
assert_equal('1.example.com', cookie.domain, 'enhanced by RFC 1123')
7070

7171
assert_raise(ArgumentError) {
72-
CGI::Cookie.new('domain'=>'-a.example.com', **h)
72+
CGI::Cookie.new(h.merge('domain'=>'-a.example.com'))
7373
}
7474

7575
assert_raise(ArgumentError) {
76-
CGI::Cookie.new('domain'=>'a-.example.com', **h)
76+
CGI::Cookie.new(h.merge('domain'=>'a-.example.com'))
7777
}
7878
end
7979

0 commit comments

Comments
 (0)