Skip to content

Commit 0c3d73a

Browse files
committed
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.
1 parent e48f77f commit 0c3d73a

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

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)