From 6edd65a080b156f1ce78fdcf57214c1644a049db Mon Sep 17 00:00:00 2001 From: Eugene Kenny Date: Wed, 24 Apr 2024 12:10:48 +0100 Subject: [Bug #20450] Remove rubyarchdir from bootsnap paths --- lib/bundled_gems.rb | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'lib') diff --git a/lib/bundled_gems.rb b/lib/bundled_gems.rb index 37ec2d942b..eea70ca19a 100644 --- a/lib/bundled_gems.rb +++ b/lib/bundled_gems.rb @@ -97,8 +97,11 @@ module Gem::BUNDLED_GEMS def self.warning?(name, specs: nil) # name can be a feature name or a file path with String or Pathname feature = File.path(name) - # bootsnap expand `require "csv"` to `require "#{LIBDIR}/csv.rb"` - name = feature.delete_prefix(LIBDIR).chomp(".rb").tr("/", "-") + # bootsnap expands `require "csv"` to `require "#{LIBDIR}/csv.rb"`, + # and `require "syslog"` to `require "#{ARCHDIR}/syslog.so"`. + name = feature.delete_prefix(ARCHDIR) + name.delete_prefix!(LIBDIR) + name.tr!("/", "-") name.sub!(LIBEXT, "") return if specs.include?(name) _t, path = $:.resolve_feature_path(feature) -- cgit v1.2.3