aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Rodríguez <deivid.rodriguez@riseup.net>2023-12-07 21:29:25 +0100
committerHiroshi SHIBATA <hsbt@ruby-lang.org>2023-12-08 15:55:15 +0900
commitd61af5c49a9cc65c7009b9d2036bf43a527e8036 (patch)
treed47183307f103fb55058bebb79358d2a2cf784d8
parent4817166e54ad98f9b3e9d06e9e8c7ccff992a957 (diff)
downloadruby-d61af5c49a9cc65c7009b9d2036bf43a527e8036.tar.gz
The SINCE and WARNED hashes take gem names, not features
-rw-r--r--lib/bundled_gems.rb7
1 files changed, 5 insertions, 2 deletions
diff --git a/lib/bundled_gems.rb b/lib/bundled_gems.rb
index 7c454e453e..66e13cfece 100644
--- a/lib/bundled_gems.rb
+++ b/lib/bundled_gems.rb
@@ -150,8 +150,11 @@ end
# If loading library is not part of the default gems and the bundled gems, warn it.
class LoadError
def message
- if !defined?(Bundler) && Gem::BUNDLED_GEMS::SINCE[path] && !Gem::BUNDLED_GEMS::WARNED[path]
- warn path + Gem::BUNDLED_GEMS.build_message(path)
+ return super unless path
+
+ name = path.tr("/", "-")
+ if !defined?(Bundler) && Gem::BUNDLED_GEMS::SINCE[name] && !Gem::BUNDLED_GEMS::WARNED[name]
+ warn name + Gem::BUNDLED_GEMS.build_message(name)
end
super
end