Skip to content

Instantly share code, notes, and snippets.

@havenwood
Last active April 24, 2024 22:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save havenwood/57ef01e562bc5ac2939477cc842cc9ad to your computer and use it in GitHub Desktop.
Save havenwood/57ef01e562bc5ac2939477cc842cc9ad to your computer and use it in GitHub Desktop.
Minimalist patch for Ruby 3.3.1 [Bug #20450] https://github.com/ruby/ruby/pull/10619
diff --git a/lib/bundled_gems.rb b/lib/bundled_gems.rb
index e756af61ea..555d1d4cd1 100644
--- a/lib/bundled_gems.rb
+++ b/lib/bundled_gems.rb
@@ -98,7 +98,7 @@ 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("/", "-")
+ name = feature.delete_prefix(ARCHDIR).delete_prefix(LIBDIR).tr("/", "-")
name.sub!(LIBEXT, "")
return if specs.include?(name)
_t, path = $:.resolve_feature_path(feature)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment