From a20b8e5e0414a2a73772f18ba8547be101b74d5c Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 6 Jan 2025 06:33:02 +0000 Subject: [PATCH 1/2] build(deps-dev): update rubyzip requirement from ~> 2.3.2 to ~> 2.4.1 Updates the requirements on [rubyzip](https://github.com/rubyzip/rubyzip) to permit the latest version. - [Release notes](https://github.com/rubyzip/rubyzip/releases) - [Changelog](https://github.com/rubyzip/rubyzip/blob/master/Changelog.md) - [Commits](https://github.com/rubyzip/rubyzip/compare/v2.3.2...v2.4.1) --- updated-dependencies: - dependency-name: rubyzip dependency-type: direct:development ... Signed-off-by: dependabot[bot] --- Gemfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Gemfile b/Gemfile index 6c9ce3e104..a3cfa75f57 100644 --- a/Gemfile +++ b/Gemfile @@ -20,7 +20,7 @@ group :development do gem "minitest", "5.25.4" gem "minitest-parallel_fork", "2.0.0" gem "ruby_memcheck", "3.0.1" - gem "rubyzip", "~> 2.3.2" + gem "rubyzip", "~> 2.4.1" gem "simplecov", "= 0.21.2" # rubocop From af5b1b0590e2f365763d1801a4a5106198b47a53 Mon Sep 17 00:00:00 2001 From: Mike Dalessio Date: Mon, 6 Jan 2025 11:47:04 -0500 Subject: [PATCH 2/2] test: drop unnecessary assertion on rubyzip read encoding --- test/xml/test_document_encoding.rb | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/test/xml/test_document_encoding.rb b/test/xml/test_document_encoding.rb index aecad95c5b..0127d1a0a0 100644 --- a/test/xml/test_document_encoding.rb +++ b/test/xml/test_document_encoding.rb @@ -124,9 +124,12 @@ class TestDocumentEncoding < Nokogiri::TestCase # no final newline on jruby. descriptive, not prescriptive. expected_length = Nokogiri.jruby? ? xml.bytesize - 1 : xml.bytesize - - assert_equal(Encoding::UTF_8, output.encoding) assert_equal(expected_length, output.bytesize) + + # Note: I dropped the assertion on the encoding of the string return from io.read + # because this behavior has changed back and forth in rubyzip versions 2.4.1 and + # 3.0.0.dev, and it's not relevant to the original bug report which was about an + # exception during writing. end end end