diff options
| author | Hiroshi SHIBATA <hsbt@ruby-lang.org> | 2024-03-25 13:29:22 +0900 |
|---|---|---|
| committer | Hiroshi SHIBATA <hsbt@ruby-lang.org> | 2024-03-25 14:33:03 +0900 |
| commit | 6b1691ebe8d8134c963f99b059beb449a8ec450b (patch) | |
| tree | ea489d0341f4cd37bcc55e6983dc436192c1c1eb | |
| parent | d6e9367edb940ea26a51e56b2be1032a97eea4c2 (diff) | |
Remove rubylibdir from bootsnap
| -rw-r--r-- | lib/bundled_gems.rb | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/bundled_gems.rb b/lib/bundled_gems.rb index 1578b48040..e756af61ea 100644 --- a/lib/bundled_gems.rb +++ b/lib/bundled_gems.rb @@ -95,8 +95,10 @@ module Gem::BUNDLED_GEMS end def self.warning?(name, specs: nil) - feature = File.path(name) # name can be a feature name or a file path with String or Pathname - name = feature.tr("/", "-") + # 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("/", "-") name.sub!(LIBEXT, "") return if specs.include?(name) _t, path = $:.resolve_feature_path(feature) |
