From defcd36c0b6e6648333d4b9ab5923eb4e543615e Mon Sep 17 00:00:00 2001 From: Hiroshi SHIBATA Date: Tue, 28 Jan 2025 09:55:02 +0900 Subject: [PATCH] Reject directory from Gem::Specification#files --- reline.gemspec | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/reline.gemspec b/reline.gemspec index bde83aa3aa..53fd2bfbf7 100644 --- a/reline.gemspec +++ b/reline.gemspec @@ -16,8 +16,13 @@ Gem::Specification.new do |spec| spec.homepage = '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/ruby/reline' spec.license = 'Ruby' - spec.files = Dir.chdir(File.expand_path('..', __FILE__)) do - Dir['BSDL', 'COPYING', 'README.md', 'license_of_rb-readline', 'lib/**/*'] + spec.files = [ + 'BSDL', + 'COPYING', + 'README.md', + 'license_of_rb-readline' + ] + Dir.chdir(File.expand_path('..', __FILE__)) do + Dir.glob("lib/**/*").map {|f| f unless File.directory?(f) }.compact end spec.require_paths = ['lib'] spec.metadata = {