From 0c3d73aeb641882065b6a93c069d10995699f5c9 Mon Sep 17 00:00:00 2001 From: Joseph Sak Date: Mon, 26 Jan 2026 12:07:55 -0700 Subject: [PATCH 1/2] Fix cross-compile path nesting for native extensions The compile.rake was adding the host Ruby version to ext.lib_dir while extconf.rb added the target Ruby version, causing double nesting like lib/code_ownership/4.0/3.2/code_ownership.so instead of the expected lib/code_ownership/3.2/code_ownership.so. This broke gem loading on Ruby 4.0 with "cannot load such file" errors. --- rakelib/compile.rake | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/rakelib/compile.rake b/rakelib/compile.rake index ee9efa9..e8a3e11 100644 --- a/rakelib/compile.rake +++ b/rakelib/compile.rake @@ -1,6 +1,5 @@ require 'rb_sys/extensiontask' RbSys::ExtensionTask.new('code_ownership', GEMSPEC) do |ext| - ruby_minor = RUBY_VERSION[/\d+\.\d+/] - ext.lib_dir = "lib/code_ownership/#{ruby_minor}" + ext.lib_dir = 'lib/code_ownership' end From f70a6a2d7ca0641d9d8fb93c454756aff62db704 Mon Sep 17 00:00:00 2001 From: Joseph Sak Date: Mon, 26 Jan 2026 12:17:07 -0700 Subject: [PATCH 2/2] Fix ruby-version-file warning in CD workflow Replace ruby-version-file with explicit ruby-version to avoid "Unexpected input" warnings from the setup-ruby action. --- .github/workflows/cd.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/cd.yml b/.github/workflows/cd.yml index 87285c1..dfa05f5 100644 --- a/.github/workflows/cd.yml +++ b/.github/workflows/cd.yml @@ -43,7 +43,7 @@ - uses: ruby/setup-ruby@v1 with: - ruby-version-file: .ruby-version + ruby-version: '4.0' - uses: oxidize-rb/actions/cross-gem@v1 id: cross-gem