aboutsummaryrefslogtreecommitdiffstats
path: root/lib/bundled_gems.rb
diff options
context:
space:
mode:
authorHiroshi SHIBATA <hsbt@ruby-lang.org>2023-11-02 13:32:53 +0900
committerHiroshi SHIBATA <hsbt@ruby-lang.org>2023-11-02 13:32:53 +0900
commite34e8b93f8fac3ef40ab5ed8672fa003f3b4d9c0 (patch)
tree435f7f27c9a1c981106f3a66d62bdfe02fc78028 /lib/bundled_gems.rb
parentd9cb75b741c786a1198f7c7e9d1eead6818b9d17 (diff)
downloadruby-e34e8b93f8fac3ef40ab5ed8672fa003f3b4d9c0.tar.gz
Support Pathname object for warning feature of bundled gems
Diffstat (limited to 'lib/bundled_gems.rb')
-rw-r--r--lib/bundled_gems.rb1
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/bundled_gems.rb b/lib/bundled_gems.rb
index f201800cf6..6fff10fdcf 100644
--- a/lib/bundled_gems.rb
+++ b/lib/bundled_gems.rb
@@ -70,6 +70,7 @@ module Gem::BUNDLED_GEMS
end
def self.warning?(name, specs: nil)
+ name = File.path(name) # name can be a feature name or a file path with String or Pathname
return if specs.to_a.map(&:name).include?(name.sub(LIBEXT, ""))
name = name.tr("/", "-")
_t, path = $:.resolve_feature_path(name)