From cc788e34e4d0217828e1d2c88abc5e78842df4e6 Mon Sep 17 00:00:00 2001 From: Mike Dalessio Date: Mon, 27 Nov 2023 18:01:18 -0500 Subject: [PATCH] dep: drop ruby 2.7 support In CI we drop ubuntu32, and update ubuntu to jammy because focal installs ruby 2.7, and there is no i386 image for jammy. --- .cross_rubies | 8 -- .github/workflows/ci.yml | 26 ++-- .github/workflows/generate-ci-images.yml | 2 +- .rubocop.yml | 2 +- CHANGELOG.md | 7 + README.md | 2 +- Vagrantfile | 79 ----------- appveyor.yml | 4 +- ext/nokogiri/extconf.rb | 1 - ext/nokogiri/xml_namespace.c | 4 - ext/nokogiri/xml_node.c | 4 - nokogiri.gemspec | 2 +- oci-images/nokogiri-test/mri-2.7.dockerfile | 40 ------ oci-images/nokogiri-test/ubuntu.dockerfile | 2 +- oci-images/nokogiri-test/ubuntu.erb | 2 +- oci-images/nokogiri-test/ubuntu32.dockerfile | 43 ------ oci-images/nokogiri-test/ubuntu32.erb | 14 -- rakelib/docker.rake | 2 +- suppressions/ruby-2.7.supp | 133 ------------------- test/test_compaction.rb | 6 +- 20 files changed, 31 insertions(+), 352 deletions(-) delete mode 100644 Vagrantfile delete mode 100644 oci-images/nokogiri-test/mri-2.7.dockerfile delete mode 100644 oci-images/nokogiri-test/ubuntu32.dockerfile delete mode 100644 oci-images/nokogiri-test/ubuntu32.erb delete mode 100644 suppressions/ruby-2.7.supp diff --git a/.cross_rubies b/.cross_rubies index beb64aaebbd..fa47675a4fe 100644 --- a/.cross_rubies +++ b/.cross_rubies @@ -1,11 +1,3 @@ -2.7.0:aarch64-linux -2.7.0:arm-linux -2.7.0:arm64-darwin -2.7.0:x64-mingw32 -2.7.0:x86-linux -2.7.0:x86-mingw32 -2.7.0:x86_64-darwin -2.7.0:x86_64-linux 3.0.0:aarch64-linux 3.0.0:arm-linux 3.0.0:arm64-darwin diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 9010e4d0d7b..e19b8900522 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -37,7 +37,7 @@ jobs: strategy: fail-fast: false matrix: - image: ["ubuntu", "ubuntu32"] + image: ["ubuntu"] sys: ["enable"] runs-on: ubuntu-latest container: @@ -98,7 +98,7 @@ jobs: fail-fast: false matrix: sys: ["enable", "disable"] - ruby: ["2.7", "3.0", "3.1", "3.2", "3.3-rc"] + ruby: ["3.0", "3.1", "3.2", "3.3-rc"] runs-on: ubuntu-latest container: image: ghcr.io/sparklemotion/nokogiri-test:mri-${{matrix.ruby}} @@ -238,7 +238,7 @@ jobs: fail-fast: false matrix: sys: ["enable", "disable"] - ruby: ["2.7", "3.0", "3.1", "3.2", "3.3.0-preview3"] + ruby: ["3.0", "3.1", "3.2", "3.3.0-preview3"] runs-on: macos-latest steps: - uses: actions/checkout@v4 @@ -263,7 +263,7 @@ jobs: fail-fast: false matrix: sys: ["enable", "disable"] - ruby: ["2.7", "3.0", "3.1", "3.2", "head", "mingw"] + ruby: ["3.0", "3.1", "3.2", "head", "mingw"] runs-on: windows-2022 steps: - name: configure git crlf @@ -431,7 +431,7 @@ jobs: fail-fast: false matrix: sys: ["enable", "disable"] - ruby: ["2.7", "3.0", "3.1", "3.2", "head"] + ruby: ["3.0", "3.1", "3.2", "head"] runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 @@ -453,7 +453,7 @@ jobs: fail-fast: false matrix: sys: ["enable", "disable"] - ruby: ["2.7", "3.0", "3.1", "3.2", "head"] + ruby: ["3.0", "3.1", "3.2", "head"] runs-on: macos-latest steps: - uses: actions/checkout@v4 @@ -474,7 +474,7 @@ jobs: fail-fast: false matrix: sys: ["enable", "disable"] - ruby: ["2.7", "3.0"] + ruby: ["3.0"] runs-on: windows-latest steps: - uses: actions/checkout@v4 @@ -556,7 +556,7 @@ jobs: strategy: fail-fast: false matrix: - ruby: ["2.7", "3.0", "3.1", "3.2", "3.3.0-preview3"] + ruby: ["3.0", "3.1", "3.2", "3.3.0-preview3"] runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 @@ -578,7 +578,7 @@ jobs: strategy: fail-fast: false matrix: - ruby: ["2.7", "3.0", "3.1", "3.2", "3.3.0-preview3"] + ruby: ["3.0", "3.1", "3.2", "3.3.0-preview3"] runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 @@ -600,7 +600,7 @@ jobs: strategy: fail-fast: false matrix: - ruby: ["2.7", "3.0", "3.1", "3.2", "3.3.0-preview3"] + ruby: ["3.0", "3.1", "3.2", "3.3.0-preview3"] runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 @@ -622,7 +622,7 @@ jobs: strategy: fail-fast: false matrix: - ruby: ["2.7", "3.0", "3.1", "3.2", "head"] + ruby: ["3.0", "3.1", "3.2", "head"] runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 @@ -659,7 +659,7 @@ jobs: strategy: fail-fast: false matrix: - ruby: ["2.7", "3.0", "3.1", "3.2", "head"] + ruby: ["3.0", "3.1", "3.2", "head"] runs-on: macos-latest steps: - uses: actions/checkout@v4 @@ -679,7 +679,7 @@ jobs: strategy: fail-fast: false matrix: - ruby: ["2.7", "3.0"] + ruby: ["3.0"] runs-on: windows-latest steps: - uses: actions/checkout@v4 diff --git a/.github/workflows/generate-ci-images.yml b/.github/workflows/generate-ci-images.yml index b18a2262887..7c51a5067de 100644 --- a/.github/workflows/generate-ci-images.yml +++ b/.github/workflows/generate-ci-images.yml @@ -11,7 +11,7 @@ jobs: strategy: fail-fast: false matrix: - tag: ["alpine", "mri-2.7", "mri-3.0", "mri-3.1", "mri-3.2", "mri-3.3-rc", "truffle-nightly", "ubuntu", "ubuntu32"] + tag: ["alpine", "mri-3.0", "mri-3.1", "mri-3.2", "mri-3.3-rc", "truffle-nightly", "ubuntu"] runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 diff --git a/.rubocop.yml b/.rubocop.yml index e7886907a4f..49c8b850266 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -14,7 +14,7 @@ AllCops: - 'lib/nokogiri/css/tokenizer.rb' # generated by rex - 'lib/nokogiri/jruby/nokogiri_jars.rb' # generated by jar-dependencies - 'test/_test_pattern_matching.rb' # until TargetRubyVersion >= 3.0 - TargetRubyVersion: "2.7" + TargetRubyVersion: "3.0" Metrics/BlockNesting: Exclude: diff --git a/CHANGELOG.md b/CHANGELOG.md index dc4c0df984b..826506027e3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,13 @@ Nokogiri follows [Semantic Versioning](https://semver.org/), please see the [REA ## next / unreleased +#### Ruby + +This release introduces native gem support for Ruby 3.3. + +This release ends support for Ruby 2.7, for which [upstream support ended 2023-03-31](https://www.ruby-lang.org/en/downloads/branches/). + + ### Notable Changes #### Pattern matching diff --git a/README.md b/README.md index fc21be46bb0..ca4e3519fed 100644 --- a/README.md +++ b/README.md @@ -111,7 +111,7 @@ You can help sponsor the maintainers of this software through one of these organ Requirements: -- Ruby >= 2.7 +- Ruby >= 3.0 - JRuby >= 9.4.0.0 diff --git a/Vagrantfile b/Vagrantfile deleted file mode 100644 index 87056691e3f..00000000000 --- a/Vagrantfile +++ /dev/null @@ -1,79 +0,0 @@ -# frozen_string_literal: true - -# -*- mode: ruby -*- -# vi: set ft=ruby : - -Box = Struct.new(:shortname, :name, :provision) - -# Every Vagrant development environment requires a box. You can search for -# boxes at https://vagrantcloud.com/search. -boxen = [] -boxen << Box.new("openbsd", "generic/openbsd6", <<~EOF) - # install rvm - pkg_add gnupg-2.2.12p0 - gpg2 --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3 7D2BAF1CF37B13E2069D6956105BD0E739499BDB - curl -sSL https://get.rvm.io | bash -s stable - source /etc/profile.d/rvm.sh - usermod -G rvm vagrant - - # install ruby and build-essentials - rvm install ruby-2.7 -EOF -boxen << Box.new("bionic32", "mkorenkov/ubuntu-bionic32", <<~EOF) - export DEBIAN_FRONTEND=noninteractive - apt-get update - apt-get install -y apt-utils - apt-get install -y libxslt-dev libxml2-dev pkg-config - apt-get install -y ruby ruby-dev bundler git -EOF -boxen << Box.new("freebsd", "freebsd/FreeBSD-13.0-CURRENT", <<~EOF) - pkg install rbenv ruby-build -EOF - -Vagrant.configure("2") do |config| - boxen.each do |box| - config.vm.define(box.shortname) do |config| - config.vm.box = box.name - - # Share an additional folder to the guest VM. The first argument is - # the path on the host to the actual folder. The second argument is - # the path on the guest to mount the folder. And the optional third - # argument is a set of non-required options. - # config.vm.synced_folder "../data", "/vagrant_data" - - config.vm.provider("virtualbox") do |vb| - vb.customize(["modifyvm", :id, "--cpus", 2]) - vb.customize(["modifyvm", :id, "--memory", 1024]) - end - - config.vm.synced_folder(".", "/nokogiri") - - if box.provision - config.vm.provision("shell", inline: box.provision) - end - end - end - - # Provider-specific configuration so you can fine-tune various - # backing providers for Vagrant. These expose provider-specific options. - # Example for VirtualBox: - # - # config.vm.provider "virtualbox" do |vb| - # # Display the VirtualBox GUI when booting the machine - # vb.gui = true - # - # # Customize the amount of memory on the VM: - # vb.memory = "1024" - # end - # - # View the documentation for the provider you are using for more - # information on available options. - - # Enable provisioning with a shell script. Additional provisioners such as - # Ansible, Chef, Docker, Puppet and Salt are also available. Please see the - # documentation for more information about their specific syntax and use. - # config.vm.provision "shell", inline: <<-SHELL - # apt-get update - # apt-get install -y apache2 - # SHELL -end diff --git a/appveyor.yml b/appveyor.yml index 630196b2dd1..013ee997105 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -40,8 +40,8 @@ environment: INSTALL_PACKAGES: "mingw-w64-i686-libxslt mingw-w64-i686-libyaml" EXTCONF_PARAMS: "--use-system-libraries" - - ruby_version: 27 + - ruby_version: 30 INSTALL_PACKAGES: "mingw-w64-i686-libyaml" - - ruby_version: 27 + - ruby_version: 30 INSTALL_PACKAGES: "mingw-w64-i686-libxslt mingw-w64-i686-libyaml" EXTCONF_PARAMS: "--use-system-libraries" diff --git a/ext/nokogiri/extconf.rb b/ext/nokogiri/extconf.rb index 9d42020e407..5e07323f508 100644 --- a/ext/nokogiri/extconf.rb +++ b/ext/nokogiri/extconf.rb @@ -1088,7 +1088,6 @@ def compile have_func("xmlRelaxNGSetValidStructuredErrors") # introduced in libxml 2.6.21 have_func("xmlSchemaSetValidStructuredErrors") # introduced in libxml 2.6.23 have_func("xmlSchemaSetParserStructuredErrors") # introduced in libxml 2.6.23 -have_func("rb_gc_location") # introduced in Ruby 2.7 have_func("rb_category_warning") # introduced in Ruby 3.0 other_library_versions_string = OTHER_LIBRARY_VERSIONS.map { |k, v| [k, v].join(":") }.join(",") diff --git a/ext/nokogiri/xml_namespace.c b/ext/nokogiri/xml_namespace.c index 614f481cb9c..ce60f6296ef 100644 --- a/ext/nokogiri/xml_namespace.c +++ b/ext/nokogiri/xml_namespace.c @@ -42,7 +42,6 @@ _xml_namespace_dealloc(void *ptr) xmlFree(ns); } -#ifdef HAVE_RB_GC_LOCATION static void _xml_namespace_update_references(void *ptr) { @@ -51,9 +50,6 @@ _xml_namespace_update_references(void *ptr) ns->_private = (void *)rb_gc_location((VALUE)ns->_private); } } -#else -# define _xml_namespace_update_references 0 -#endif static const rb_data_type_t nokogiri_xml_namespace_type_with_dealloc = { .wrap_struct_name = "Nokogiri::XML::Namespace#with_dealloc", diff --git a/ext/nokogiri/xml_node.c b/ext/nokogiri/xml_node.c index 174c8319576..57cea731c9c 100644 --- a/ext/nokogiri/xml_node.c +++ b/ext/nokogiri/xml_node.c @@ -28,7 +28,6 @@ _xml_node_mark(void *ptr) } } -#ifdef HAVE_RB_GC_LOCATION static void _xml_node_update_references(void *ptr) { @@ -38,9 +37,6 @@ _xml_node_update_references(void *ptr) node->_private = (void *)rb_gc_location((VALUE)node->_private); } } -#else -# define _xml_node_update_references 0 -#endif static const rb_data_type_t nokogiri_node_type = { .wrap_struct_name = "Nokogiri::XML::Node", diff --git a/nokogiri.gemspec b/nokogiri.gemspec index 70e284f1a4b..f3127e02997 100644 --- a/nokogiri.gemspec +++ b/nokogiri.gemspec @@ -40,7 +40,7 @@ Gem::Specification.new do |spec| spec.license = "MIT" - spec.required_ruby_version = ">= 2.7.0" + spec.required_ruby_version = ">= 3.0.0" spec.homepage = "https://nokogiri.org" spec.metadata = { diff --git a/oci-images/nokogiri-test/mri-2.7.dockerfile b/oci-images/nokogiri-test/mri-2.7.dockerfile deleted file mode 100644 index 3ded10f0ad5..00000000000 --- a/oci-images/nokogiri-test/mri-2.7.dockerfile +++ /dev/null @@ -1,40 +0,0 @@ -FROM ruby:2.7 - -# include_file debian-prelude.step -# -*- dockerfile -*- - -ARG DEBIAN_FRONTEND=noninteractive -RUN apt-get update -RUN apt-get upgrade -y -RUN apt-get install -y apt-utils - - -# include_file debian-valgrind.step -# -*- dockerfile -*- - -RUN apt-get install -y valgrind - - -# include_file debian-libxml-et-al.step -# -*- dockerfile -*- - -RUN apt-get install -y libxslt-dev libxml2-dev zlib1g-dev pkg-config -RUN apt-get install -y libyaml-dev # for psych 5 - - -# include_file update-bundler.step -# -*- dockerfile -*- - -RUN gem install bundler - - -# include_file bundle-install.step -# -*- dockerfile -*- - -COPY Gemfile nokogiri/ -COPY Gemfile.lock nokogiri/ -COPY nokogiri.gemspec nokogiri/ - -RUN gem install bundler -v "$(grep -A 1 "BUNDLED WITH" nokogiri/Gemfile.lock | tail -n 1)" -RUN cd nokogiri && bundle install - diff --git a/oci-images/nokogiri-test/ubuntu.dockerfile b/oci-images/nokogiri-test/ubuntu.dockerfile index 9c98fe2157d..ee92f0fe272 100644 --- a/oci-images/nokogiri-test/ubuntu.dockerfile +++ b/oci-images/nokogiri-test/ubuntu.dockerfile @@ -1,4 +1,4 @@ -FROM ubuntu:focal +FROM ubuntu:jammy # include_file debian-prelude.step # -*- dockerfile -*- diff --git a/oci-images/nokogiri-test/ubuntu.erb b/oci-images/nokogiri-test/ubuntu.erb index 0e3b17631c6..436ccfd3004 100644 --- a/oci-images/nokogiri-test/ubuntu.erb +++ b/oci-images/nokogiri-test/ubuntu.erb @@ -1,4 +1,4 @@ -FROM ubuntu:focal +FROM ubuntu:jammy <%= include_file "debian-prelude.step" %> diff --git a/oci-images/nokogiri-test/ubuntu32.dockerfile b/oci-images/nokogiri-test/ubuntu32.dockerfile deleted file mode 100644 index 019313ebcf4..00000000000 --- a/oci-images/nokogiri-test/ubuntu32.dockerfile +++ /dev/null @@ -1,43 +0,0 @@ -FROM i386/ubuntu:focal - -# include_file debian-prelude.step -# -*- dockerfile -*- - -ARG DEBIAN_FRONTEND=noninteractive -RUN apt-get update -RUN apt-get upgrade -y -RUN apt-get install -y apt-utils - - -# include_file debian-git.step -# -*- dockerfile -*- - -RUN apt-get install -y git-core - - -# include_file debian-libxml-et-al.step -# -*- dockerfile -*- - -RUN apt-get install -y libxslt-dev libxml2-dev zlib1g-dev pkg-config -RUN apt-get install -y libyaml-dev # for psych 5 - - -# include_file debian-ruby.step -# -*- dockerfile -*- - -RUN apt-get install -y ruby ruby-dev bundler - - -# include_file bundle-install.step -# -*- dockerfile -*- - -COPY Gemfile nokogiri/ -COPY Gemfile.lock nokogiri/ -COPY nokogiri.gemspec nokogiri/ - -RUN gem install bundler -v "$(grep -A 1 "BUNDLED WITH" nokogiri/Gemfile.lock | tail -n 1)" -RUN cd nokogiri && bundle install - - -# for libxml2 canonicalization -ENV LANG=C.UTF-8 diff --git a/oci-images/nokogiri-test/ubuntu32.erb b/oci-images/nokogiri-test/ubuntu32.erb deleted file mode 100644 index a75687c0168..00000000000 --- a/oci-images/nokogiri-test/ubuntu32.erb +++ /dev/null @@ -1,14 +0,0 @@ -FROM i386/ubuntu:focal - -<%= include_file "debian-prelude.step" %> - -<%= include_file "debian-git.step" %> - -<%= include_file "debian-libxml-et-al.step" %> - -<%= include_file "debian-ruby.step" %> - -<%= include_file "bundle-install.step" %> - -# for libxml2 canonicalization -ENV LANG=C.UTF-8 diff --git a/rakelib/docker.rake b/rakelib/docker.rake index ce62e17e7ad..8cdb0ac524f 100644 --- a/rakelib/docker.rake +++ b/rakelib/docker.rake @@ -8,7 +8,7 @@ module DockerHelper IMAGE_DIR = "oci-images/nokogiri-test" IMAGE_NAME = "ghcr.io/sparklemotion/nokogiri-test" RUBIES = { - mri: ["2.7", "3.0", "3.1", "3.2", "3.3-rc"], + mri: ["3.0", "3.1", "3.2", "3.3-rc"], truffle: ["nightly"], } diff --git a/suppressions/ruby-2.7.supp b/suppressions/ruby-2.7.supp deleted file mode 100644 index 657a4c0722a..00000000000 --- a/suppressions/ruby-2.7.supp +++ /dev/null @@ -1,133 +0,0 @@ -{ - ruby 2.7 startup - Memcheck:Addr4 - fun:iseq_peephole_optimize - fun:iseq_optimize* - fun:iseq_setup_insn - fun:iseq_setup_insn - fun:rb_iseq_compile_node - fun:rb_iseq_new_with_opt - fun:new_child_iseq - ... - # fun:iseq_compile_each0 - # fun:iseq_compile_each0 - # fun:rb_iseq_compile_node - # fun:rb_iseq_new_with_opt - # fun:new_child_iseq - # fun:iseq_compile_each0 - # fun:iseq_compile_each0 - # fun:rb_iseq_compile_node - # fun:rb_iseq_new_with_opt - # fun:new_child_iseq - # fun:iseq_compile_each0 - # fun:iseq_compile_each0 - # fun:rb_iseq_compile_node - # fun:rb_iseq_new_with_opt - # fun:rb_iseq_new_top - # fun:load_iseq_eval - # fun:require_internal - # fun:rb_require_string - # fun:vm_call_cfunc_with_frame - # fun:vm_call_cfunc - # fun:vm_call_method_each_type.part.410 - # fun:vm_call_method_each_type - # fun:vm_call_method - # fun:vm_sendish - # fun:vm_exec_core - # fun:rb_vm_exec - # fun:load_iseq_eval - # fun:require_internal - # fun:rb_require_string - # fun:vm_call_cfunc_with_frame - # fun:vm_call_cfunc - # fun:vm_call_method_each_type.part.410 - # fun:vm_call_method_each_type - # fun:vm_call_method - # fun:vm_sendish - # fun:vm_exec_core - # fun:rb_vm_exec - # fun:load_iseq_eval - # fun:require_internal - # fun:rb_require_string - # fun:vm_call_cfunc_with_frame - # fun:vm_call_cfunc - # fun:vm_call_method_each_type.part.410 - # fun:vm_call_method_each_type - # fun:vm_call_method - # fun:vm_sendish - # fun:vm_exec_core - # fun:rb_vm_exec - # fun:load_iseq_eval - # fun:require_internal - # fun:rb_require_string - # fun:vm_call_cfunc_with_frame - # fun:vm_call_cfunc - # fun:vm_call_method_each_type.part.410 - # fun:vm_call_method_each_type - # fun:vm_call_method - # fun:vm_sendish - # fun:vm_exec_core - # fun:rb_vm_exec - # fun:load_iseq_eval - # fun:require_internal - # fun:rb_require_string - # fun:vm_call_cfunc_with_frame - # fun:vm_call_cfunc -} -{ - https://github.com/sparklemotion/nokogiri/actions/runs/4368293547/jobs/7640738309#step:7:4616 - Memcheck:Addr4 - fun:rb_gc_location - fun:rb_gc_location - fun:transient_heap_block_update_refs - fun:transient_heap_blocks_update_refs - fun:rb_transient_heap_update_references - fun:gc_update_references - fun:gc_compact_after_gc - fun:gc_compact - fun:gc_verify_compaction_references - ... - # fun:vm_call_cfunc_with_frame - # fun:vm_call_cfunc - # fun:vm_sendish - # fun:vm_exec_core - # fun:rb_vm_exec - # fun:invoke_bmethod - # fun:invoke_iseq_block_from_c - # fun:invoke_block_from_c_proc - # fun:rb_vm_invoke_bmethod - # fun:vm_call_bmethod_body - # fun:vm_call_bmethod - # fun:vm_call_opt_send - # fun:vm_sendish - # fun:vm_exec_core - # fun:rb_vm_exec - # fun:vm_yield - # fun:rb_yield_0 - # fun:rb_yield_1 - # fun:rb_yield - # fun:rb_ary_each - # fun:rb_ary_each - # fun:vm_call_cfunc_with_frame - # fun:vm_call_cfunc - # fun:vm_sendish - # fun:vm_exec_core - # fun:rb_vm_exec - # fun:vm_yield - # fun:rb_yield_0 - # fun:rb_yield_1 - # fun:rb_yield - # fun:rb_ary_collect - # fun:vm_call_cfunc_with_frame - # fun:vm_call_cfunc - # fun:vm_sendish - # fun:vm_exec_core - # fun:rb_vm_exec - # fun:rb_proc_call - # fun:exec_end_procs_chain - # fun:rb_ec_exec_end_proc - # fun:rb_ec_teardown - # fun:rb_ec_cleanup - # fun:ruby_run_node - # fun:main -} diff --git a/test/test_compaction.rb b/test/test_compaction.rb index b3948c4c5f8..2f16a233eaf 100644 --- a/test/test_compaction.rb +++ b/test/test_compaction.rb @@ -4,10 +4,8 @@ describe "compaction" do def skip_compaction_tests - # skip if compaction is not supported, or if we're running Ruby 2.7 on windows - # (because compaction is buggy on that platform) - !GC.respond_to?(:verify_compaction_references) || - (RUBY_VERSION.start_with?("2.7") && Gem.win_platform?) + # supported in CRuby >= 3.0 + !GC.respond_to?(:verify_compaction_references) end describe Nokogiri::XML::Node do