summaryrefslogtreecommitdiff
path: root/tool/rbinstall.rb
diff options
context:
space:
mode:
authorNobuyoshi Nakada <nobu@ruby-lang.org>2022-07-13 22:17:18 +0900
committerNobuyoshi Nakada <nobu@ruby-lang.org>2022-07-14 09:00:13 +0900
commit416cba90c1610f54dafd91234de9ec74d73ae22c (patch)
tree21fc40a5a189864cd2bfc86c795e501a8895ef5d /tool/rbinstall.rb
parentb2491783986084770f6f97552f27b868622730cf (diff)
downloadruby-416cba90c1610f54dafd91234de9ec74d73ae22c.tar.gz
Try to install also gemspec files under gem directories
Gemspec files having extension libraries are placed under each gem directories now.
Diffstat (limited to 'tool/rbinstall.rb')
-rwxr-xr-xtool/rbinstall.rb5
1 files changed, 4 insertions, 1 deletions
diff --git a/tool/rbinstall.rb b/tool/rbinstall.rb
index cbefb0ebbc..ab3193f9e0 100755
--- a/tool/rbinstall.rb
+++ b/tool/rbinstall.rb
@@ -1051,7 +1051,10 @@ install?(:ext, :comm, :gem, :'bundled-gems') do
next unless /^(\S+)\s+(\S+).*/ =~ name
gem_name = "#$1-#$2"
path = "#{srcdir}/.bundle/specifications/#{gem_name}.gemspec"
- next unless File.exist?(path)
+ unless File.exist?(path)
+ path = "#{srcdir}/.bundle/gems/#{gem_name}/#{gem_name}.gemspec"
+ next unless File.exist?(path)
+ end
spec = load_gemspec(path, "#{srcdir}/.bundle/gems/#{gem_name}")
next unless spec.platform == Gem::Platform::RUBY
next unless spec.full_name == gem_name