Skip to content

Commit aec2355

Browse files
authored
Fix cross-compile path nesting and ruby-version-file warning in CD (#156)
* 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. * 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.
1 parent e48f77f commit aec2355

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

.github/workflows/cd.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@
4343

4444
- uses: ruby/setup-ruby@v1
4545
with:
46-
ruby-version-file: .ruby-version
46+
ruby-version: '4.0'
4747

4848
- uses: oxidize-rb/actions/cross-gem@v1
4949
id: cross-gem

rakelib/compile.rake

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
require 'rb_sys/extensiontask'
22

33
RbSys::ExtensionTask.new('code_ownership', GEMSPEC) do |ext|
4-
ruby_minor = RUBY_VERSION[/\d+\.\d+/]
5-
ext.lib_dir = "lib/code_ownership/#{ruby_minor}"
4+
ext.lib_dir = 'lib/code_ownership'
65
end

0 commit comments

Comments
 (0)