aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHiroshi SHIBATA <hsbt@ruby-lang.org>2024-02-16 15:39:36 +0900
committerHiroshi SHIBATA <hsbt@ruby-lang.org>2024-02-16 17:28:00 +0900
commit4047222aca02a35774746eb91c5661427410149e (patch)
tree61c5cb5f0bd3fd96aa9d8e1c3aa9a3b3047327da
parentbc7266c5ce51b170c107011c712f97b4dc8243a6 (diff)
downloadruby-4047222aca02a35774746eb91c5661427410149e.tar.gz
Try to load original gemspec from `.bundle/gems/foo-x.y.z/foo.gemspec`.
`.bundle/specification/foo-x.y.z.gemspec` may be changed our toolchain
-rwxr-xr-xtool/rbinstall.rb11
1 files changed, 6 insertions, 5 deletions
diff --git a/tool/rbinstall.rb b/tool/rbinstall.rb
index 1001d5a640..f4a8d03577 100755
--- a/tool/rbinstall.rb
+++ b/tool/rbinstall.rb
@@ -1041,12 +1041,13 @@ install?(:ext, :comm, :gem, :'bundled-gems') do
next if /^\s*(?:#|$)/ =~ name
next unless /^(\S+)\s+(\S+).*/ =~ name
gem_name = "#$1-#$2"
- # 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"
+ # Try to find the gemspec file
+ path = "#{srcdir}/.bundle/gems/#{gem_name}/#{name}.gemspec"
unless File.exist?(path)
- 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)
skipped[gem_name] = "gemspec not found"
next