From 0eaa283efb297c6e379da132f7cf635cfb6520bf Mon Sep 17 00:00:00 2001 From: k-tsuchiya-jp Date: Thu, 8 Jan 2026 17:13:14 +0900 Subject: [PATCH 1/2] Add Ruby 4.0 to CI --- .github/workflows/test.yml | 1 + docker-compose.yml | 14 ++++++++++++++ 2 files changed, 15 insertions(+) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index a1ce7996..4e27ae76 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -25,6 +25,7 @@ jobs: - "3.2" - "3.3" - "3.4" + - "4.0" - "jruby-9.4" - "truffleruby" steps: diff --git a/docker-compose.yml b/docker-compose.yml index 4fbfbec8..d570d43b 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -92,6 +92,20 @@ services: - .:/code working_dir: /code + ci-4.0: + image: ruby:4.0 + entrypoint: /code/ci-run.sh + environment: + INTEGRATION: openldap + INTEGRATION_HOST: ldap.example.org + depends_on: + - openldap + networks: + integration_test_network: + volumes: + - .:/code + working_dir: /code + # https://github.com/flavorjones/truffleruby/pkgs/container/truffleruby ci-truffleruby: image: ghcr.io/flavorjones/truffleruby:stable From e87169b20dd7bf247722b698362c4e1cbed6f283 Mon Sep 17 00:00:00 2001 From: k-tsuchiya-jp Date: Thu, 8 Jan 2026 17:14:16 +0900 Subject: [PATCH 2/2] Fix bind timeout test for Ruby 4.0 error message change Make bind timeout test robust against message variations Ruby 4.0 changed socket timeout handling, which can result in different timeout error messages compared to Ruby 3.x (see https://github.com/ruby/ruby/pull/15582). The bind timeout integration test previously relied on exact string matching, causing failures despite valid timeouts. This change relaxes the assertion to check for expected message fragments instead, making the test resilient across Ruby versions. --- test/integration/test_bind.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/integration/test_bind.rb b/test/integration/test_bind.rb index 4a1a0194..79304d29 100644 --- a/test/integration/test_bind.rb +++ b/test/integration/test_bind.rb @@ -16,7 +16,7 @@ def test_bind_timeout end msgs = ['Operation timed out - user specified timeout', 'Connection timed out - user specified timeout'] - assert_send([msgs, :include?, error.message]) + assert msgs.any? { |m| error.message.include?(m) }, "unexpected message: #{error.message.inspect}" end def test_bind_anonymous_fail