diff options
author | Hiroshi SHIBATA <hsbt@ruby-lang.org> | 2023-02-16 17:54:09 +0900 |
---|---|---|
committer | nagachika <nagachika@ruby-lang.org> | 2023-02-23 12:45:16 +0900 |
commit | 76c61c9993e59af0b4c400b44f169f4af99c3efa (patch) | |
tree | b8ee8c3809df42e4b0d91431b59dfa0cc5da0a13 | |
parent | 4141989b2aef2993bb19140a4be355d1c68b8be1 (diff) | |
download | ruby-76c61c9993e59af0b4c400b44f169f4af99c3efa.tar.gz |
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 8534cf75a3..ba2739fa49 100755 --- a/tool/rbinstall.rb +++ b/tool/rbinstall.rb @@ -1045,9 +1045,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}") |