diff options
author | Hiroshi SHIBATA <hsbt@ruby-lang.org> | 2023-02-22 19:00:00 +0900 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-02-22 10:00:00 +0000 |
commit | 65ab2c1ef23bd4a02120a27c371dce12ea9024d4 (patch) | |
tree | d93b06cb118ef222b9cca2dd7fa1fdf37d8eb937 | |
parent | 31819e82c88c6f8ecfaeb162519bfa26a14b21fd (diff) | |
download | ruby-65ab2c1ef23bd4a02120a27c371dce12ea9024d4.tar.gz |
Backport [Bug #19158] for Ruby 3.2 (#7356)
Backport https://github.com/ruby/ruby/pull/7321
-rwxr-xr-x | tool/rbinstall.rb | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/tool/rbinstall.rb b/tool/rbinstall.rb index 02ce7faaa7..f910fca57b 100755 --- a/tool/rbinstall.rb +++ b/tool/rbinstall.rb @@ -1026,9 +1026,12 @@ install?(:ext, :comm, :gem, :'bundled-gems') do next if /^\s*(?:#|$)/ =~ name next unless /^(\S+)\s+(\S+).*/ =~ name gem_name = "#$1-#$2" - path = "#{srcdir}/.bundle/specifications/#{gem_name}.gemspec" + # Try to find the gemspec file for C ext gems + # ex .bundle/gems/debug-1.7.1/debug-1.7.1.gemspec + # This gemspec keep the original dependencies + path = "#{srcdir}/.bundle/gems/#{gem_name}/#{gem_name}.gemspec" unless File.exist?(path) - path = "#{srcdir}/.bundle/gems/#{gem_name}/#{gem_name}.gemspec" + path = "#{srcdir}/.bundle/specifications/#{gem_name}.gemspec" next unless File.exist?(path) end spec = load_gemspec(path, "#{srcdir}/.bundle/gems/#{gem_name}") |