Support git ls-files ....split style for file list of gemspec

This commit is contained in:
Hiroshi SHIBATA 2025-02-07 11:02:42 +09:00 committed by Takashi Kokubun
parent 84b60a03cd
commit 5b226fdb8d

View file

@ -980,7 +980,7 @@ end
def load_gemspec(file, base = nil)
file = File.realpath(file)
code = File.read(file, encoding: "utf-8:-")
code.gsub!(/(?:`git[^\`]*`|%x\[git[^\]]*\])\.split\([^\)]*\)/m) do
code.gsub!(/(?:`git[^\`]*`|%x\[git[^\]]*\])\.split(\([^\)]*\))?/m) do
files = []
if base
Dir.glob("**/*", File::FNM_DOTMATCH, base: base) do |n|