From b6e4fa71d514796ee826b1257bfd7b2a177f5f09 Mon Sep 17 00:00:00 2001 From: Nobuyoshi Nakada Date: Thu, 7 May 2026 20:32:26 +0900 Subject: [ruby/rubygems] Use Pathname#absolute? `Pathname::SEPARATOR_PAT` should be private, but was not set to private just due to a typo. https://github.com/ruby/rubygems/commit/67ce6df4c9 --- lib/bundler/source/path.rb | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/bundler/source/path.rb b/lib/bundler/source/path.rb index 82e782ba25..366a23aea7 100644 --- a/lib/bundler/source/path.rb +++ b/lib/bundler/source/path.rb @@ -220,10 +220,11 @@ module Bundler # Some gem authors put absolute paths in their gemspec # and we have to save them from themselves spec.files = spec.files.filter_map do |path| - next path unless /\A#{Pathname::SEPARATOR_PAT}/o.match?(path) + pathname = Pathname.new(path) + next path unless pathname.absolute? next if File.directory?(path) begin - Pathname.new(path).relative_path_from(gem_dir).to_s + pathname.relative_path_from(gem_dir).to_s rescue ArgumentError path end -- cgit v1.2.3