ruby-changes:72823
From: Nobuyoshi <ko1@a...>
Date: Fri, 5 Aug 2022 13:00:48 +0900 (JST)
Subject: [ruby-changes:72823] 5791171201 (master): Load gemspec file at that directory
https://git.ruby-lang.org/ruby.git/commit/?id=5791171201 From 57911712011e285d76cf8132dd080b5727f43bf3 Mon Sep 17 00:00:00 2001 From: Nobuyoshi Nakada <nobu@r...> Date: Thu, 4 Aug 2022 17:30:03 +0900 Subject: Load gemspec file at that directory Gemspec files generated by old bundler run `git` without changing the working directory. Or some gemspec files expect an owned file at the top exists ath the current working directory. --- tool/lib/bundled_gem.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tool/lib/bundled_gem.rb b/tool/lib/bundled_gem.rb index 0b7d52b86a..38c331183d 100644 --- a/tool/lib/bundled_gem.rb +++ b/tool/lib/bundled_gem.rb @@ -15,8 +15,8 @@ module BundledGem https://github.com/ruby/ruby/blob/trunk/tool/lib/bundled_gem.rb#L15 end def copy(path, *rest) - spec = Gem::Specification.load(path) - path = File.dirname(path) + path, n = File.split(path) + spec = Dir.chdir(path) {Gem::Specification.load(n)} or raise "Cannot load #{path}" prepare_test(spec, *rest) do |dir| FileUtils.rm_rf(dir) files = spec.files.reject {|f| f.start_with?(".git")} -- cgit v1.2.1 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/