Skip to content

Commit

Permalink
Merge pull request #162 from dentarg/ci/ruby-3.2
Browse files Browse the repository at this point in the history
Add Ruby 3.2 to CI matrix
  • Loading branch information
roback committed Apr 3, 2023
2 parents 0276b52 + 7cac8d4 commit e20f5fc
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 2 deletions.
1 change: 1 addition & 0 deletions .github/workflows/ci.yml
Expand Up @@ -16,6 +16,7 @@ jobs:
- { ruby: '2.7' }
- { ruby: '3.0' }
- { ruby: '3.1' }
- { ruby: '3.2' }
- { ruby: head, allow-failure: true }
- { ruby: jruby-9.3 }
- { ruby: jruby-head, allow-failure: true }
Expand Down
1 change: 0 additions & 1 deletion .ruby-version

This file was deleted.

10 changes: 9 additions & 1 deletion spec/lib/twingly/public_suffix_list_spec.rb
Expand Up @@ -22,10 +22,18 @@

context "when the list data is read as US-ASCII" do
let(:encoding) { Encoding::US_ASCII }
# https://github.com/ruby/ruby/commit/571d21fd4a2e877f49b4ff918832bda9a5e8f91c
let(:expected_error) do
if RUBY_VERSION >= "3.2.0"
Encoding::CompatibilityError
else
ArgumentError
end
end

it "parsing the data will fail" do
expect { subject }.
to raise_error(ArgumentError, "invalid byte sequence in US-ASCII")
to raise_error(expected_error, "invalid byte sequence in US-ASCII")
end
end
end
Expand Down

0 comments on commit e20f5fc

Please sign in to comment.